Espaços nominais
Variantes
Acções

thread_create

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.
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>
int thrd_create( thrd_t *thr, thrd_start_t func, void *arg );
(desde C11)
Cria um novo segmento de executar o func função. A função é chamada 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.
Se for bem sucedido, o objeto apontado por thr está definido para o identificador do segmento novo.
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.
A realização desta função é sincronizado com o início da 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.

Índice

[editar] Parâmetros

thr -
ponteiro ao local de memória para colocar o identificador do novo segmento
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 -
função a ser executada
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 passar para a função
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 se a criação do novo segmento foi bem sucedida. Caso contrário, retorna thrd_nomem se havia quantidade insuficiente de memória ou thrd_error se outro erro.
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

O fio identifica pode ser reutilizado para novos tópicos uma vez que o segmento foi concluído e entrou ou individual.
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] Veja também

destaca uma discussão
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.

(função) [edit]
blocos até que um segmento 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.

(função) [edit]