atomic_is_lock_free()

Determine whether atomic operations on an object are lock-free (C11)

Synopsis:

#include <stdatomic.h>

_Bool atomic_is_lock_free( const volatile A* obj );

Arguments:

obj
A pointer to the atomic object (see the atomic_* types) that you want to check.

Library:

None.

Description:

The atomic_is_lock_free() function is a generic function that determines whether or not atomic operations on the given type of object are lock-free. This depends on your target platform; if the compiler can't generate lock-free instructions for your target, you need to link your program against libatomic.

This function isn't atomic.

Returns:

true if the operations are lock-free, or false otherwise.

Classification:

C11

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes