Espacios de nombres
Variantes
Acciones

call_once

De cppreference.com
< c‎ | thread

 
 
Tema Biblioteca de ayuda
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.
Exclusión mutua
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.
Llame a la 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
Las variables de condición
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.
Almacenamiento local de subprocesos
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)
Las llamadas a funciones func exactamente una vez, incluso si se invoca desde varios hilos .
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.
La finalización de la func función sincroniza con todas las llamadas anteriores o posteriores a call_once con el mismo flag variable .
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 -
puntero a un objeto que se utiliza para asegurar func se llama sólo una 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 -
la función a ejecutar
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

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