thread_create
De cppreference.com
![]() | Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate. La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
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.
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.
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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[editar]Ver también
(C11) | 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) |
(C11) | 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) |