std::atomic_flag_clear, std::atomic_flag_clear_explicit
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <atomic>
|
||
| void atomic_flag_clear( volatile std::atomic_flag* p ); |
(1) | (C++11 起) |
| void atomic_flag_clear( std::atomic_flag* p ); |
(2) | (C++11 起) |
| void atomic_flag_clear_explicit( volatile std::atomic_flag* p, std::memory_order order ) |
(3) | (C++11 起) |
| void atomic_flag_clear_explicit( std::atomic_flag* p, std::memory_order order ) |
(4) | (C++11 起) |
Atomically changes the state of a std::atomic_flag pointed to by p to clear (false).
目录 |
[编辑] 参数
| p | - | 指针std::atomic_flag访问
Original: pointer to std::atomic_flag to access The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| order | - | the memory sycnhronization ordering for this operation: only std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire, or std::memory_order_seq_cst are permitted. |
[编辑] 返回值
无
Original:
none.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 例外
[编辑] 可能的实现
| First version |
|---|
void atomic_flag_clear(volatile std::atomic_flag* p) { p->clear(); } |
| Second version |
void atomic_flag_clear(std::atomic_flag* p) { p->clear(); } |
| Third version |
void atomic_flag_clear_explicit(volatile std::atomic_flag* p, std::memory_order order) { p->clear(order); } |
| Fourth version |
void atomic_flag_clear_explicit(std::atomic_flag* p, std::memory_order order) { p->clear(order); } |
[编辑] 另请参阅
| (C++11) |
无锁的布尔原子类型 Original: the lock-free boolean atomic type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类) |
| 以原子方式设置标志true,并返回其先前的值 Original: atomically sets the flag to true and returns its previous value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| (C++11) |
定义内存排序约束给定的原子操作 Original: defines memory ordering constraints for the given atomic operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) |
| C documentation for atomic_flag_clear, atomic_flag_clear_explicit
| |