ATOMIC_*_LOCK_FREE
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <stdatomic.h> 中定义
|
||
| #define ATOMIC_BOOL_LOCK_FREE /* implementation-defined */ #define ATOMIC_CHAR_LOCK_FREE /* implementation-defined */ |
(C11 起) | |
扩展或
0,1或2表示无锁属性对应的原子类型(有符号和无符号).原文:
Expands to either
0, 1 or 2 which indicate the lock-free property of the corresponding atomic types (both signed and unsigned).| 值
|
Explanation |
0
|
原子类型是从来没有锁
|
1
|
有时是无锁的原子类型
原文: The atomic type is sometimes lock-free |
2
|
始终是无锁的原子类型
|