#define ATOMIC_BOOL_LOCK_FREE /* implementation-defined */
#define ATOMIC_CHAR_LOCK_FREE /* implementation-defined */
#define ATOMIC_CHAR16_T_LOCK_FREE /* implementation-defined */
#define ATOMIC_CHAR32_T_LOCK_FREE /* implementation-defined */
#define ATOMIC_WCHAR_T_LOCK_FREE /* implementation-defined */
#define ATOMIC_SHORT_LOCK_FREE /* implementation-defined */
#define ATOMIC_INT_LOCK_FREE /* implementation-defined */
#define ATOMIC_LONG_LOCK_FREE /* implementation-defined */
#define ATOMIC_LLONG_LOCK_FREE /* implementation-defined */
#define ATOMIC_POINTER_LOCK_FREE /* implementation-defined */ |
|
(C11 起) |
| | |
展开成求值为 0
或 1
或 2
的预处理器常量表达式,它指示对应原子类型(有符号及无符号一同)的免锁属性。
|
值
|
解释
|
0
|
该原子类型决不免锁
|
1
|
该原子类型有时免锁
|
2
|
该原子类型始终免锁
|
引用
- C11 standard (ISO/IEC 9899:2011):
- 7.17.1/3 atomic lock-free macros (p: 273)