Monday, October 31, 2016

C Library Function – stdatomic

The <stdatomic.h> header shall define the following function(s).

Atomic generic Functions:
object - pointer to the atomic flag object to initialize/modify/inspect/access/test
order, success, failure - the memory synchronization ordering for this operation
expected - pointer to the value expected to be found in the atomic object
desired, value - the value to initialize/store/replace the atomic object with
operand - the value to add/subtract/bitwise OR/bitwise XOR/bitwise AND to the value stored in the atomic object

atomic_flag_test_and_set(C11) _Bool atomic_flag_test_and_set( volatile atomic_flag *object);
atomic_flag_test_and_set_explicit(C11) _Bool atomic_flag_test_and_set_explicit( volatile atomic_flag *object, memory_order order);
atomic_flag_clear(C11) void atomic_flag_clear(volatile atomic_flag *object);
atomic_flag_clear_explicit(C11) void atomic_flag_clear_explicit( volatile atomic_flag *object, memory_order order);
atomic_init(C11) void atomic_init(volatile A *obj, C value);
atomic_is_lock_free(C11) _Bool atomic_is_lock_free(const volatile A *obj);
atomic_store(C11) void atomic_store(volatile A *object, C desired);
atomic_store_explicit(C11) void atomic_store_explicit(volatile A *object, C desired, memory_order order);
atomic_load(C11) C atomic_load(volatile A *object);
atomic_load_explicit(C11) C atomic_load_explicit(volatile A *object, memory_order order);
atomic_exchange(C11) C atomic_exchange(volatile A *object, C desired);
atomic_exchange_explicit(C11) C atomic_exchange_explicit(volatile A *object, C desired, memory_order order);
atomic_compare_exchange_strong(C11) __Bool atomic_compare_exchange_strong(volatile A *object, C *expected, C desired);
atomic_compare_exchange_strong_explicit(C11) _Bool atomic_compare_exchange_strong_explicit( volatile A *object, C *expected, C desired, memory_order success, memory_order failure);
atomic_compare_exchange_weak(C11) _Bool atomic_compare_exchange_weak(volatile A *object, C *expected, C desired);
atomic_compare_exchange_weak_explicit(C11) _Bool atomic_compare_exchange_weak_explicit( volatile A *object, C *expected, C desired, memory_order success, memory_order failure);
atomic_fetch_add(C11) C atomic_fetch_add( volatile A* object, M operand );
atomic_fetch_add_explicit(C11) C atomic_fetch_add_explicit( volatile A* object, M arg, memory_order order );
atomic_fetch_sub(C11) C atomic_fetch_sub( volatile A* object, M operand);
atomic_fetch_sub_explicit(C11) C atomic_fetch_sub_explicit( volatile A* object, M operand, memory_order order );
atomic_fetch_or(C11) C atomic_fetch_or( volatile A* object, M operand);
atomic_fetch_or_explicit(C11) C atomic_fetch_or_explicit( volatile A* object, M operand, memory_order order );
atomic_fetch_xor(C11) C atomic_fetch_xor( volatile A* object, M operand);
atomic_fetch_xor_explicit(C11) C atomic_fetch_xor_explicit( volatile A* object, M operand, memory_order order );
atomic_fetch_and(C11) C atomic_fetch_and( volatile A* object, M operand);
atomic_fetch_and_explicit(C11) C atomic_fetch_and_explicit( volatile A* object, M operand, memory_order order );
atomic_thread_fence(C11) void atomic_thread_fence(memory_order order);
atomic_signal_fence(C11) void atomic_signal_fence(memory_order order);



Related topics:
Library Functions in C   |   Standard Library in C   |   Header Files in C   |   Functions in C   |   Keywords in C   |   Data Types in C   |   Pointers in C

List of topics: C Programming

No comments:

Post a Comment