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. |
| Заголовочный файл <atomic>
|
||
| #define ATOMIC_FLAG_INIT /* implementation-defined */ |
||
Определяет выражение, которое может быть использовано для инициализации std::atomic_flag, чтобы очистить государство. Если флаг имеет статическую продолжительность хранения, эта инициализация статических.
Original:
Defines the expression which can be used to initialize std::atomic_flag to clear state. If the flag has static storage duration, this initialization is static.
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.
[править] Пример
#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. (класс) |