24 #ifndef COMPAT_ATOMICS_DUMMY_STDATOMIC_H 25 #define COMPAT_ATOMICS_DUMMY_STDATOMIC_H 29 #define ATOMIC_FLAG_INIT 0 31 #define ATOMIC_VAR_INIT(value) (value) 33 #define atomic_init(obj, value) \ 38 #define kill_dependency(y) ((void)0) 40 #define atomic_thread_fence(order) \ 43 #define atomic_signal_fence(order) \ 46 #define atomic_is_lock_free(obj) 0 85 #define atomic_store(object, desired) \ 87 *(object) = (desired); \ 90 #define atomic_store_explicit(object, desired, order) \ 91 atomic_store(object, desired) 93 #define atomic_load(object) \ 96 #define atomic_load_explicit(object, order) \ 101 intptr_t ret = *object;
106 #define atomic_exchange_explicit(object, desired, order) \ 107 atomic_exchange(object, desired) 113 if (*
object == *expected) {
123 #define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ 124 atomic_compare_exchange_strong(object, expected, desired) 126 #define atomic_compare_exchange_weak(object, expected, desired) \ 127 atomic_compare_exchange_strong(object, expected, desired) 129 #define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ 130 atomic_compare_exchange_weak(object, expected, desired) 132 #define FETCH_MODIFY(opname, op) \ 133 static inline intptr_t atomic_fetch_ ## opname(intptr_t *object, intptr_t operand) \ 137 *object = *object op operand; \ 149 #define atomic_fetch_add_explicit(object, operand, order) \ 150 atomic_fetch_add(object, operand) 152 #define atomic_fetch_sub_explicit(object, operand, order) \ 153 atomic_fetch_sub(object, operand) 155 #define atomic_fetch_or_explicit(object, operand, order) \ 156 atomic_fetch_or(object, operand) 158 #define atomic_fetch_xor_explicit(object, operand, order) \ 159 atomic_fetch_xor(object, operand) 161 #define atomic_fetch_and_explicit(object, operand, order) \ 162 atomic_fetch_and(object, operand) 164 #define atomic_flag_test_and_set(object) \ 165 atomic_exchange(object, 1) 167 #define atomic_flag_test_and_set_explicit(object, order) \ 168 atomic_flag_test_and_set(object) 170 #define atomic_flag_clear(object) \ 171 atomic_store(object, 0) 173 #define atomic_flag_clear_explicit(object, order) \ 174 atomic_flag_clear(object)
intptr_t atomic_uint_fast8_t
intptr_t atomic_int_least8_t
#define FETCH_MODIFY(opname, op)
intptr_t atomic_int_least32_t
intptr_t atomic_int_fast16_t
intptr_t atomic_uintptr_t
intptr_t atomic_int_fast32_t
intptr_t atomic_int_fast8_t
static intptr_t atomic_exchange(intptr_t *object, intptr_t desired)
intptr_t atomic_uint_fast16_t
intptr_t atomic_int_least16_t
static int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, intptr_t desired)
intptr_t atomic_uint_fast32_t
intptr_t atomic_uint_least32_t
intptr_t atomic_int_fast64_t
intptr_t atomic_uint_least16_t
intptr_t atomic_uint_fast64_t
intptr_t atomic_uintmax_t
intptr_t atomic_int_least64_t
intptr_t atomic_ptrdiff_t
intptr_t atomic_uint_least8_t
intptr_t atomic_uint_least64_t