Notice: Unexpected clearActionName after getActionName already called in /var/www/cppreference.com/public/includes/context/RequestContext.php on line 338
call_once - cppreference.com
close
Espacios de nombres
Variantes

call_once

De cppreference.com
< c | thread
(Redirigido desde «c/thread/ONCE FLAG INIT»)
 
 
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.
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.
 
<tbody> </tbody>
Definido en el archivo de encabezado <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.

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.

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.