<commit_before>#ifndef FIBRIL_H
#define FIBRIL_H

#include "fibrili.h"

typedef struct _fibril_t fibril_t;

#define FIBRIL_SUCCESS 0
#define FIBRIL_MAX_PROCS -1

#define fibril_init(frptr) do { \
  fibril_t * f = (frptr); \
  f->count = -1; \
  f->lock  = 0; \
} while (0)

#define fibril_fork(frptr, fn, ret, ...) do { \
  fibril_t * f = (frptr); \
  fibrili_save(f, AFTER_FORK_##fn##_##__FILE__##__LINE__); \
  fibrili_push(f); \
  ret = fn(__VA_ARGS__); \
  if (!fibrili_pop()) { \
    volatile __auto_type retptr = &ret; \
    *retptr = ret; \
    fibrili_resume(f); \
    AFTER_FORK_##fn##_##__FILE__##__LINE__: ret = *retptr; \
  } \
} while (0)

#define fibril_join(frptr) do { \
  fibril_t * f = (frptr); \
  if (f->count == -1 || fibrili_join(f)) break; \
  fibrili_save(f, AFTER_JOIN_##__FILE__##__LINE__); \
  fibrili_yield(f); \
  AFTER_JOIN_##__FILE__##__LINE__: break; \
} while (0)
<commit_msg>Potential bug fix.<commit_after>#ifndef FIBRIL_H
#define FIBRIL_H

#include "fibrili.h"

typedef struct _fibril_t fibril_t;

#define FIBRIL_SUCCESS 0
#define FIBRIL_MAX_PROCS -1

#define fibril_init(frptr) do { \
  fibril_t * f = (frptr); \
  f->count = -1; \
  f->lock  = 0; \
} while (0)

#define fibril_fork(frptr, fn, ret, ...) do { \
  fibril_t * f = (frptr); \
  fibrili_save(f, AFTER_FORK_##fn##_##__FILE__##__LINE__); \
  fibrili_push(f); \
  ret = fn(__VA_ARGS__); \
  if (!fibrili_pop()) { \
    volatile __auto_type volatile retptr = &ret; \
    *retptr = ret; \
    fibrili_resume(f); \
    AFTER_FORK_##fn##_##__FILE__##__LINE__: ret = *retptr; \
  } \
} while (0)

#define fibril_join(frptr) do { \
  fibril_t * f = (frptr); \
  if (f->count == -1 || fibrili_join(f)) break; \
  fibrili_save(f, AFTER_JOIN_##__FILE__##__LINE__); \
  fibrili_yield(f); \
  AFTER_JOIN_##__FILE__##__LINE__: break; \
} while (0)

{'fraction_non_alphanumeric': 0.17631004366812228, 'fraction_numerical': 0.008733624454148471, 'mean_word_length': 3.5483870967741935, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4677586', 'n_tokens_mistral': 862, 'n_tokens_neox': 840, 'n_words': 149}