ATOMIC_FLAG_INIT
Da 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. |
Definido no cabeçalho <atomic>
|
||
#define ATOMIC_FLAG_INIT /* implementation-defined */ |
||
Define a expressão que pode ser usado para inicializar std::atomic_flag para limpar estado. Se a bandeira tem duração de armazenagem estática, essa inicialização é estático.
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.
[editar] Exemplo
#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); }
[editar] Veja também
(C++11) |
o lock-livre tipo boolean atômica 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. (classe) |