ATOMIC_FLAG_INIT
De 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. |
Déclaré dans l'en-tête <atomic> | ||
#define ATOMIC_FLAG_INIT /* implementation-defined */ | ||
Définit l'expression qui peut être utilisé pour initialiser std::atomic_flag pour effacer l'état. Si le drapeau a une durée de stockage statique, cette initialisation est statique .
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.
[modifier]Exemple
#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);}
[modifier]Voir aussi
(C++11) | la serrure sans type booléen atomique 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) |