Go to the source code of this file.
|
#define | ATOMIC_FLAG_INIT 0 |
#define | ATOMIC_VAR_INIT(VAL) |
#define | atomic_flag_test_and_set(FLAG) |
#define | atomic_flag_test_and_set_explicit(FLAG, MO) |
#define | atomic_flag_clear(FLAG) |
#define | atomic_flag_clear_explicit(FLAG, MO) |
#define | atomic_init(OBJ, VAL) |
#define | atomic_is_lock_free(OBJ) |
#define | atomic_store(OBJ, VAL) |
#define | atomic_store_explicit(OBJ, VAL, MO) |
#define | atomic_load(OBJ) |
#define | atomic_load_explicit(OBJ, MO) |
#define | atomic_exchange(OBJ, DES) |
#define | atomic_exchange_explicit(OBJ, DES, MO) |
#define | atomic_compare_exchange_strong(OBJ, EXP, DES) |
#define | atomic_compare_exchange_strong_explicit(OBJ, EXP, DES, MO) |
#define | atomic_compare_exchange_weak(OBJ, EXP, DES) |
#define | atomic_compare_exchange_weak_explicit(OBJ, EXP, DES, MO) |
#define | atomic_fetch_add(OBJ, VAL) |
#define | atomic_fetch_add_explicit(OBJ, VAL, MO) |
#define | atomic_fetch_sub(OBJ, VAL) |
#define | atomic_fetch_sub_explicit(OBJ, VAL, MO) |
#define | atomic_fetch_or(OBJ, VAL) |
#define | atomic_fetch_or_explicit(OBJ, VAL, MO) |
#define | atomic_fetch_xor(OBJ, VAL) |
#define | atomic_fetch_xor_explicit(OBJ, VAL, MO) |
#define | atomic_fetch_and(OBJ, VAL) |
#define | atomic_fetch_and_explicit(OBJ, VAL, MO) |
#define | atomic_thread_fence(MO) |
#define | atomic_signal_fence(MO) |
◆ atomic_compare_exchange_strong
#define atomic_compare_exchange_strong |
( |
| OBJ, |
|
|
| EXP, |
|
|
| DES ) |
Value: ({ \
__typeof__(OBJ) obj = (OBJ); \
__typeof__(EXP) exp = (EXP); \
__typeof__(*obj) expval = *exp; \
__typeof__(*obj) oldval = __sync_val_compare_and_swap( \
obj, expval, (DES)); \
*exp = oldval; \
oldval == expval; \
})
◆ atomic_compare_exchange_strong_explicit
#define atomic_compare_exchange_strong_explicit |
( |
| OBJ, |
|
|
| EXP, |
|
|
| DES, |
|
|
| MO ) |
Value:
#define atomic_compare_exchange_strong(OBJ, EXP, DES)
Definition atomic.h:79
◆ atomic_compare_exchange_weak
#define atomic_compare_exchange_weak |
( |
| OBJ, |
|
|
| EXP, |
|
|
| DES ) |
◆ atomic_compare_exchange_weak_explicit
#define atomic_compare_exchange_weak_explicit |
( |
| OBJ, |
|
|
| EXP, |
|
|
| DES, |
|
|
| MO ) |
Value:
#define atomic_compare_exchange_weak(OBJ, EXP, DES)
Definition atomic.h:91
◆ atomic_exchange
#define atomic_exchange |
( |
| OBJ, |
|
|
| DES ) |
Value: ({ \
__typeof__(OBJ) obj = (OBJ); \
__typeof__(*obj) des = (DES); \
__typeof__(*obj) expval; \
do { \
expval = oldval; \
oldval = __sync_val_compare_and_swap( \
obj, expval, des); \
} while (oldval != expval); \
oldval; \
})
#define atomic_load(OBJ)
Definition atomic.h:60
◆ atomic_exchange_explicit
#define atomic_exchange_explicit |
( |
| OBJ, |
|
|
| DES, |
|
|
| MO ) |
Value:
#define atomic_exchange(OBJ, DES)
Definition atomic.h:64
◆ atomic_fetch_add
#define atomic_fetch_add |
( |
| OBJ, |
|
|
| VAL ) |
Value: __sync_fetch_and_add((OBJ), (VAL))
◆ atomic_fetch_add_explicit
#define atomic_fetch_add_explicit |
( |
| OBJ, |
|
|
| VAL, |
|
|
| MO ) |
Value:
#define atomic_fetch_add(OBJ, VAL)
Definition atomic.h:95
◆ atomic_fetch_and
#define atomic_fetch_and |
( |
| OBJ, |
|
|
| VAL ) |
Value: __sync_fetch_and_and((OBJ), (VAL))
◆ atomic_fetch_and_explicit
#define atomic_fetch_and_explicit |
( |
| OBJ, |
|
|
| VAL, |
|
|
| MO ) |
Value:
#define atomic_fetch_and(OBJ, VAL)
Definition atomic.h:111
◆ atomic_fetch_or
#define atomic_fetch_or |
( |
| OBJ, |
|
|
| VAL ) |
Value: __sync_fetch_and_or((OBJ), (VAL))
◆ atomic_fetch_or_explicit
#define atomic_fetch_or_explicit |
( |
| OBJ, |
|
|
| VAL, |
|
|
| MO ) |
Value:
#define atomic_fetch_or(OBJ, VAL)
Definition atomic.h:103
◆ atomic_fetch_sub
#define atomic_fetch_sub |
( |
| OBJ, |
|
|
| VAL ) |
Value: __sync_fetch_and_sub((OBJ), (VAL))
◆ atomic_fetch_sub_explicit
#define atomic_fetch_sub_explicit |
( |
| OBJ, |
|
|
| VAL, |
|
|
| MO ) |
Value:
#define atomic_fetch_sub(OBJ, VAL)
Definition atomic.h:99
◆ atomic_fetch_xor
#define atomic_fetch_xor |
( |
| OBJ, |
|
|
| VAL ) |
Value: __sync_fetch_and_xor((OBJ), (VAL))
◆ atomic_fetch_xor_explicit
#define atomic_fetch_xor_explicit |
( |
| OBJ, |
|
|
| VAL, |
|
|
| MO ) |
Value:
#define atomic_fetch_xor(OBJ, VAL)
Definition atomic.h:107
◆ atomic_flag_clear
#define atomic_flag_clear |
( |
| FLAG | ) |
|
Value: __sync_lock_release((FLAG))
◆ atomic_flag_clear_explicit
#define atomic_flag_clear_explicit |
( |
| FLAG, |
|
|
| MO ) |
Value:
#define atomic_flag_clear(FLAG)
Definition atomic.h:48
◆ ATOMIC_FLAG_INIT
#define ATOMIC_FLAG_INIT 0 |
◆ atomic_flag_test_and_set
#define atomic_flag_test_and_set |
( |
| FLAG | ) |
|
Value: __sync_lock_test_and_set((FLAG), 1)
◆ atomic_flag_test_and_set_explicit
#define atomic_flag_test_and_set_explicit |
( |
| FLAG, |
|
|
| MO ) |
Value:
#define atomic_flag_test_and_set(FLAG)
Definition atomic.h:44
◆ atomic_init
#define atomic_init |
( |
| OBJ, |
|
|
| VAL ) |
Value: do { *(OBJ) = (VAL); } while (0)
◆ atomic_is_lock_free
#define atomic_is_lock_free |
( |
| OBJ | ) |
|
Value: (sizeof(*(OBJ)) <= sizeof(long))
◆ atomic_load
#define atomic_load |
( |
| OBJ | ) |
|
Value:
#define __sync_synchronize()
Definition cpu.h:21
◆ atomic_load_explicit
#define atomic_load_explicit |
( |
| OBJ, |
|
|
| MO ) |
◆ atomic_signal_fence
#define atomic_signal_fence |
( |
| MO | ) |
|
◆ atomic_store
#define atomic_store |
( |
| OBJ, |
|
|
| VAL ) |
◆ atomic_store_explicit
#define atomic_store_explicit |
( |
| OBJ, |
|
|
| VAL, |
|
|
| MO ) |
Value:
#define atomic_store(OBJ, VAL)
Definition atomic.h:56
◆ atomic_thread_fence
#define atomic_thread_fence |
( |
| MO | ) |
|
◆ ATOMIC_VAR_INIT
#define ATOMIC_VAR_INIT |
( |
| VAL | ) |
|
◆ atomic_char
◆ atomic_flag
◆ atomic_int
◆ atomic_llong
◆ atomic_long
◆ atomic_short
◆ atomic_uchar
◆ atomic_uint
◆ atomic_uintptr_t
◆ atomic_ullong
◆ atomic_ulong
◆ atomic_ushort
◆ memory_order
Enumerator |
---|
memory_order_relaxed | |
memory_order_consume | |
memory_order_acquire | |
memory_order_release | |
memory_order_acq_rel | |
memory_order_seq_cst | |