<commit_before>#ifndef _chpl_atomics_h_
#define _chpl_atomics_h_

#include <assert.h>
#ifdef SIMPLE_TEST
#include "sys_basic.h"
#include <stdint.h>
#include <stdbool.h>
typedef bool chpl_bool;
#else
#include "chpltypes.h" // chpl_bool -- but that undefines printf, which
                       // causes problems with the C test cases.
#endif

typedef int_least8_t atomic_int_least8_t;
typedef int_least16_t atomic_int_least16_t;
typedef int_least32_t atomic_int_least32_t;
typedef int_least64_t atomic_int_least64_t;
typedef uint_least8_t atomic_uint_least8_t;
typedef uint_least16_t atomic_uint_least16_t;
typedef uint_least32_t atomic_uint_least32_t;
typedef uint_least64_t atomic_uint_least64_t;
typedef uintptr_t atomic_uintptr_t;
typedef chpl_bool atomic_flag;
typedef _real64 atomic__real64;
typedef _real32 atomic__real32;

typedef enum {
 memory_order_relaxed,
 memory_order_consume,
 memory_order_acquire,
 memory_order_release,
 memory_order_acq_rel,
 memory_order_seq_cst
} memory_order;

static inline
void atomic_thread_fence(memory_order order)
{
  __sync_synchronize();
}
static inline<commit_msg>Added #defines for _real32 and _real64 when chpltypes.h is not included (for  Michael's C tests).<commit_after>#ifndef _chpl_atomics_h_
#define _chpl_atomics_h_

#include <assert.h>
#ifdef SIMPLE_TEST
#include "sys_basic.h"
#include <stdint.h>
#include <stdbool.h>
typedef bool chpl_bool; // these are required to enable chpl_bools and floating
typedef float _real32;  // point atomics in the C tests (and also to keep them 
typedef double _real64; // from breaking!)
#else
#include "chpltypes.h" // this undefines printf, which
                       // causes problems with the C test cases.
#endif

typedef int_least8_t atomic_int_least8_t;
typedef int_least16_t atomic_int_least16_t;
typedef int_least32_t atomic_int_least32_t;
typedef int_least64_t atomic_int_least64_t;
typedef uint_least8_t atomic_uint_least8_t;
typedef uint_least16_t atomic_uint_least16_t;
typedef uint_least32_t atomic_uint_least32_t;
typedef uint_least64_t atomic_uint_least64_t;
typedef uintptr_t atomic_uintptr_t;
typedef chpl_bool atomic_flag;
typedef _real64 atomic__real64;
typedef _real32 atomic__real32;

typedef enum {
 memory_order_relaxed,
 memory_order_consume,
 memory_order_acquire,
 memory_order_release,
 memory_order_acq_rel,
 memory_order_seq_cst
} memory_order;

static inline
void atomic_thread_fence(memory_order order)
{
  __sync_synchronize();
}
static inline
{'fraction_non_alphanumeric': 0.05784789644012945, 'fraction_numerical': 0.032362459546925564, 'mean_word_length': 6.471299093655589, 'pattern_counts': {'":': 0, '<': 9, '<?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': '4733484', 'n_tokens_mistral': 1005, 'n_tokens_neox': 865, 'n_words': 212}