std::atomic_flag::test_and_set
De cppreference.com
< cpp | atomic | atomic flag
![]() |
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>
|
||
bool test_and_set(std::memory_order order = std::memory_order_seq_cst) volatile; |
(1) | (depuis C++11) |
bool test_and_set(std::memory_order order = std::memory_order_seq_cst); |
(2) | (depuis C++11) |
Change atomiquement l'état d'un std::atomic_flag à régler (true) et renvoie la valeur qu'elle détenait avant .
Original:
Atomically changes the state of a std::atomic_flag to set (true) and returns the value it held before.
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] Paramètres
order | - | sycnhronization la mémoire de commande pour cette opération
Original: the memory sycnhronization ordering for this operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[modifier] Exceptions
[modifier] Voir aussi
définit de manière atomique drapeau pour false Original: atomically sets flag to false The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |
(C++11) (C++11) |
définit de manière atomique le drapeau pour true et renvoie sa valeur précédente Original: atomically sets the flag to true and returns its previous value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
(C++11) |
définit des contraintes de mémoire de commande pour l'opération donnée atomique Original: defines memory ordering constraints for the given atomic operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |