Espaços nominais
Variantes
Acções

call_once

Da cppreference.com
< c‎ | thread

 
 
Biblioteca de suporte a discussão
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exclusão mútua
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Chamar uma vez
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
call_once
Variáveis ​​de condição
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Segmento local de armazenamento
Original:
Thread-local storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Defined in header <threads.h>
void call_once( once_flag* flag, void (*func)(void) );
(desde C11)
Chamadas de função func exatamente uma vez, mesmo se invocado de vários segmentos.
Original:
Calls function func exactly once, even if invoked from several threads.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A conclusão da func função sincroniza com todas as chamadas anteriores ou posteriores para call_once com o mesmo flag variável.
Original:
The completion of the function func synchronizes with all previous or subsequent calls to call_once with the same flag variable.
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

flag -
apontador para um objecto que é utilizado para garantir func é chamado somente uma vez
Original:
pointer to an object that is used to ensure func is called only once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
func -
a função a ser executada
Original:
the function to execute
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

(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.