atomic_flag

Defined in header <stdatomic.h> typedef /* unspecified */ atomic_flag; (since C11) atomic_flag is an atomic boolean type. Unlike other atomic types, it is guaranteed to be lock-free. Unlike atomic_bool, atomic_flag does not provide load or store operations. References C11 standard (ISO/IEC 9899:2011): 7.17.1/4 atomic_flag (p: 273) 7.17.8 Atomic flag type and operations (p: 285-286)

atomic_fetch_xor

Defined in header <stdatomic.h> C atomic_fetch_xor( volatile A* obj, M arg ); (1) (since C11) C atomic_fetch_xor_explicit( volatile A* obj, M arg, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with the result of bitwise XOR between the old value of obj and arg, and returns the value obj held previously. The operation is read-modify-write operation. The first version orders memory accesses according to memory_order_seq_cst, the seco

atomic_fetch_sub

Defined in header <stdatomic.h> C atomic_fetch_sub( volatile A* obj, M arg ); (1) (since C11) C atomic_fetch_sub_explicit( volatile A* obj, M arg, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with the result of subtraction of arg from the old value of obj, and returns the value obj held previously. The operation is read-modify-write operation. The first version orders memory accesses according to memory_order_seq_cst, the second v

atomic_fetch_or

Defined in header <stdatomic.h> C atomic_fetch_or( volatile A* obj, M arg ); (1) (since C11) C atomic_fetch_or_explicit( volatile A* obj, M arg, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with the result of bitwise OR between the old value of obj and arg, and returns the value obj held previously. The operation is read-modify-write operation. The first version orders memory accesses according to memory_order_seq_cst, the second

atomic_fetch_and

Defined in header <stdatomic.h> C atomic_fetch_and( volatile A* obj, M arg ); (1) (since C11) C atomic_fetch_and_explicit( volatile A* obj, M arg, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with the result of bitwise AND between the old value of obj and arg, and returns the value obj held previously. The operation is read-modify-write operation. The first version orders memory accesses according to memory_order_seq_cst, the seco

atomic_fetch_add

Defined in header <stdatomic.h> C atomic_fetch_add( volatile A* obj, M arg ); (1) (since C11) C atomic_fetch_add_explicit( volatile A* obj, M arg, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with the result of addition of arg to the old value of obj, and returns the value obj held previously. The operation is read-modify-write operation. The first version orders memory accesses according to memory_order_seq_cst, the second versio

atomic_exchange

Defined in header <stdatomic.h> C atomic_exchange( volatile A* obj, C desired ); (1) (since C11) C atomic_exchange_explicit( volatile A* obj, C desired, memory_order order ); (2) (since C11) Atomically replaces the value pointed by obj with desired and returns the value obj held previously. The operation is read-modify-write operation. The first version orders memory accesses according to memory_order_seq_cst, the second version orders memory accesses according to ord

atomic_compare_exchange_weak

Defined in header <stdatomic.h> _Bool atomic_compare_exchange_strong( volatile A* obj, C* expected, C desired ); (1) (since C11) _Bool atomic_compare_exchange_weak( volatile A *obj, C* expected, C desired ); (2) (since C11) _Bool atomic_compare_exchange_strong_explicit( volatile A* obj, C* expected, C desired,

ATOMIC_*_LOCK_FREE

Defined in header <stdatomic.h> #define ATOMIC_BOOL_LOCK_FREE /* implementation-defined */ #define ATOMIC_CHAR_LOCK_FREE /* implementation-defined */ #define ATOMIC_CHAR16_T_LOCK_FREE /* implementation-defined */ #define ATOMIC_CHAR32_T_LOCK_FREE /* implementation-defined */ #define ATOMIC_WCHAR_T_LOCK_FREE /* implementation-defined */ #define ATOMIC_SHORT_LOCK_FREE /* implementation-defined */ #define ATOMIC_INT_LOCK_FREE /* implementation-defined */ #define ATOM

atomic types

Syntax _Atomic ( type-name ) (1) (since C11) _Atomic type-name (2) (since C11) 1) Use as a type specifier; this designates a new atomic type 2) Use as a type qualifier; this designates the atomic version of type-name. In this role, it may be mixed with const, volatile, and restrict), although unlike other qualifiers, the atomic version of type-name may have a different size, alignment, and object representation. type-name - any type other than array or function. For (1),