Espacios de nombres
Variantes
Acciones

thread_create

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.
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.
 
Definido en el archivo de encabezado <threads.h>
int thrd_create(thrd_t*thr, thrd_start_t func, void*arg );
(desde C11)
Crea un nuevo hilo de ejecución func la función. La función se invoca como func(arg) .
Original:
Creates a new thread executing the function func. The function is invoked as func(arg).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si tiene éxito, el objeto al que apunta thr se establece en el identificador del nuevo hilo .
Original:
If successful, the object pointed to by thr is set to the identifier of the new thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La realización de esta función se sincroniza con el comienzo de la rosca .
Original:
The completion of this function synchronizes with the beginning of the thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar]Parámetros

thr -
puntero a la ubicación de memoria para poner el identificador del nuevo hilo
Original:
pointer to memory location to put the identifier of the new thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
func -
funcionar a ejecutar
Original:
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.
arg -
argumento para pasar a la función
Original:
argument to pass to the function
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

thrd_success si la creación del nuevo hilo fue exitosa. De lo contrario devuelve thrd_nomem si había una cantidad insuficiente de memoria o thrd_error si otro error .
Original:
thrd_success if the creation of the new thread was successful. Otherwise returns thrd_nomem if there was insufficient amount of memory or thrd_error if another error occurred.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar]Notas

El hilo se identifica puede ser reutilizada para nuevos temas una vez que el mensaje ha terminado y unido o separado .
Original:
The thread identifies may be reused for new threads once the thread has finished and joined or detached.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar]Ver también

desprende un hilo
Original:
detaches a thread
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
bloquea hasta que un subproceso termina
Original:
blocks until a thread terminates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función)[editar]
close