ATOMIC_FLAG_INIT
来自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>
|
||
| #define ATOMIC_FLAG_INIT /* implementation-defined */ |
||
定義可初始化std::atomic_flag以清除其狀態的表達式。如果該標誌是以靜態方式存儲的,這個初始化行為將是靜態的。
[编辑] 例
#include <atomic> std::atomic_flag static_flag = ATOMIC_FLAG_INIT; int main() { std::atomic_flag automatic_flag = ATOMIC_FLAG_INIT; std::atomic_flag another_flag(ATOMIC_FLAG_INIT); }
[编辑] 另請參閱
| (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. (類) |