ATOMIC_FLAG_INIT
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <atomic>
|
||
#define ATOMIC_FLAG_INIT /* implementation-defined */ |
||
Definisce l'espressione che può essere utilizzato per inizializzare std::atomic_flag per cancellare lo stato. Se il flag ha una durata di archiviazione statica, questa inizializzazione è statico.
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.
Esempio
#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);
}
Vedi anche
(C++11) |
il blocco privo di tipo booleano atomica 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) |