std::atomic_flag::test_and_set
Da 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. |
Definido no cabeçalho <atomic>
|
||
bool test_and_set(std::memory_order order = std::memory_order_seq_cst) volatile; |
(1) | (desde C++11) |
bool test_and_set(std::memory_order order = std::memory_order_seq_cst); |
(2) | (desde C++11) |
Atomicamente altera o estado de um std::atomic_flag para definir (true) e retorna o valor que ele realizou antes.
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.
[editar] Parâmetros
order | - | o sycnhronization memória de ordenação para esta operação
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. |
[editar] Exceções
[editar] Veja também
atomicamente define bandeira para 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. (função pública membro) | |
atomicamente define o sinalizador para true e retorna seu valor anterior 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. (função) | |
(C++11) |
define restrições de memória de encomenda para a operação dada atômica 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) |