atomic_flag_clear, atomic_flag_clear_explicit
来自 cppreference.cn
定义于头文件 <stdatomic.h> |
||
void atomic_flag_clear( volatile atomic_flag* obj ); |
(1) | (自 C11 起) |
void atomic_flag_clear_explicit( volatile atomic_flag* obj, memory_order order ); |
(2) | (自 C11 起) |
原子地更改由 obj
指向的 atomic_flag
的状态为清除 (false)。第一个版本根据 memory_order_seq_cst 排序内存访问,第二个版本根据 order
排序内存访问。
参数是指向 volatile 原子标志的指针,以接受非 volatile 和 volatile (例如,内存映射 I/O) 原子标志的地址。
内容 |
[编辑] 参数
obj | - | 指向要修改的原子标志对象的指针 |
order | - | 此操作的内存同步顺序:允许所有值 |
[编辑] 返回值
(无)
[编辑] 参考文献
- C17 标准 (ISO/IEC 9899:2018)
- 7.17.8.2 atomic_flag_clear 函数 (页码:209)
- C11 标准 (ISO/IEC 9899:2011)
- 7.17.8.2 atomic_flag_clear 函数 (页码:286)
[编辑] 参见
将 atomic_flag 设置为 true 并返回旧值 (function) | |
C++ 文档,关于 atomic_flag_clear, atomic_flag_clear_explicit
|