Espaços nominais
Variantes
Acções

atomic_flag_test_and_set, atomic_flag_test_and_set_explicit

Da cppreference.com
< c‎ | atomic

 
 
Biblioteca operações atômica
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
memory_order
atomic_flag
Macros
Original:
Macros
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ATOMIC_***_LOCK_FREE
ATOMIC_FLAG_INIT
ATOMIC_VAR_INIT
kill_dependency
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
atomic_flag_test_and_set
atomic_flag_clear
atomic_init
atomic_is_lock_free
atomic_store
atomic_load
atomic_exchange
atomic_compare_exchange
atomic_fetch_add
atomic_fetch_sub
atomic_fetch_or
atomic_fetch_xor
atomic_fetch_and
atomic_thread_fence
atomic_signal_fence
 
Defined in header <stdatomic.h>
_Bool atomic_flag_test_and_set( volatile atomic_flag* obj );
(1)
_Bool atomic_flag_test_and_set_explicit( volatile atomic_flag* obj, memory_order order );
(2)
Atomicamente altera o estado de um atomic_flag apontado por obj para definir (true) e retorna o valor anterior. A primeira versão de memória acessa ordens de acordo com memory_order_seq_cst, a segunda versão de memória acessa ordens de acordo com order.
Original:
Atomically changes the state of a atomic_flag pointed to by obj to set (true) and returns the previous value. The first version orders memory accesses according to memory_order_seq_cst, the second version orders memory accesses according to order.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Parâmetros

obj -
ponteiro para o objeto bandeira atômica para modificar
Original:
pointer to the atomic flag object to modify
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
order -
a sincronização da memória de ordenação para esta operação: todos os valores são permitidos
Original:
the memory synchronization ordering for this operation: all values are permitted
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

O valor anterior, realizada pela bandeira atômica apontado por obj.
Original:
The previous value held by the atomic flag pointed to by obj.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Veja também

define um atomic_flag para false
Original:
sets an atomic_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) [edit]
C++ documentation for atomic_flag_test_and_set, atomic_flag_test_and_set_explicit