These macros specify whether the atomic types corresponding to particular built-in types are lock-free or not.
#define ATOMIC_BOOL_LOCK_FREE unspecified #define ATOMIC_CHAR_LOCK_FREE unspecified #define ATOMIC_SHORT_LOCK_FREE unspecified #define ATOMIC_INT_LOCK_FREE unspecified #define ATOMIC_LONG_LOCK_FREE unspecified #define ATOMIC_LLONG_LOCK_FREE unspecified #define ATOMIC_CHAR16_T_LOCK_FREE unspecified #define ATOMIC_CHAR32_T_LOCK_FREE unspecified #define ATOMIC_WCHAR_T_LOCK_FREE unspecified #define ATOMIC_POINTER_LOCK_FREE unspecified // for backwards compatibility only #define ATOMIC_ADDRESS_LOCK_FREE unspecified
The value of ATOMIC_type_LOCK_FREE is either 0, 1 or 2. A value
of 0 means that operations on both the signed and unsigned atomic types
corresponding to the named type are never lock-free,
a value of 1 means that the operations may be lock-free for particular
instances of those types, and not for others, and a value of 2 means that
the operations are always lock-free. e.g. if ATOMIC_INT_LOCK_FREE
is 2 then operations on instances of std::atomic<int> and std::atomic<unsigned> are always lock-free.
The macro ATOMIC_POINTER_LOCK_FREE
describes the lock-free property of operations on the atomic pointer specializations
std::atomic<T*>.
The macro ATOMIC_ADDRESS_LOCK_FREE
is an alias for ATOMIC_POINTER_LOCK_FREE
provided for backwards compatibility with previous releases.
just::thread Specific
The macros ATOMIC_CHAR16_T_LOCK_FREE
and ATOMIC_CHAR32_T_LOCK_FREE
are only defined if the corresponding native types are available on the
target platform.
Header
#include <atomic>