ATOMIC_*_LOCK_FREE
来自cppreference.com
                    
                                        
                    
                    
                                                            
                    |   在标头  <stdatomic.h> 定义
  | 
||
|   #define ATOMIC_BOOL_LOCK_FREE     /* implementation-defined */ #define ATOMIC_CHAR_LOCK_FREE     /* implementation-defined */  | 
(C11 起) | |
|   #define ATOMIC_CHAR8_T_LOCK_FREE  /* implementation-defined */  | 
(C23 起) | |
展开成求值为 0 或 1 或 2 的预处理器常量表达式,它指示对应原子类型(有符号及无符号一同)的免锁属性。
| 值 | 解释 | 
  0
 | 
该原子类型决不免锁 | 
  1
 | 
该原子类型有时免锁 | 
  2
 | 
该原子类型始终免锁 | 
引用
- C17 标准(ISO/IEC 9899:2018):
 
- 7.17.1/3 atomic lock-free macros (第 200 页)
 
- C11 标准(ISO/IEC 9899:2011):
 
- 7.17.1/3 atomic lock-free macros (第 273 页)