atomic_thread_fence()

Generic memory order-dependent fence synchronization primitive (C11)

Synopsis:

#include <stdatomic.h>

void atomic_thread_fence( memory_order order );

Arguments:

order
The memory_order to use for the fence.

Library:

Description:

The atomic_thread_fence() function establishes a memory-synchronization ordering of non-atomic and relaxed atomic accesses, as instructed by order, without an associated atomic operation.

Classification:

C11

Safety:  
Cancellation point No
Interrupt handler Read the Caveats
Signal handler Read the Caveats
Thread Yes

Caveats:

If this function is lock-free (see atomic_is_lock_free()), it's safe to call it from an ISR or signal handler.