atomic_is_lock_free

Defined in header <stdatomic.h> _Bool atomic_is_lock_free( const volatile A* obj ); (since C11) Determines if the atomic operations on all objects of the type A (the type of the object pointed to by obj) are lock-free. In any given program execution, the result of calling atomic_is_lock_free is the same for all pointers of the same type. This is a generic function defined for all atomic object types A. The argument is pointer to a volatile atomic type to accept addresses of

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_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_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_*_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_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_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 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),

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