ATOMIC_*_LOCK_FREE
From Get docs
< Atomic operations libraryC/docs/latest/atomic/atomic lock free consts
ATOMIC_*_LOCK_FREE
Defined in header <stdatomic.h>
|
||
---|---|---|
|
(since C11) |
Expands to preprocessor constant expressions that evaluate to either 0
, 1
, or 2
which indicate the lock-free property of the corresponding atomic types (both signed and unsigned).
Value | Explanation |
---|---|
0
|
The atomic type is never lock-free |
1
|
The atomic type is sometimes lock-free |
2
|
The atomic type is always lock-free |
References
C11 standard (ISO/IEC 9899:2011):
- 7.17.1/3 atomic lock-free macros (p: 273)
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/c/atomic/ATOMIC_LOCK_FREE_consts