Espaces de noms
Variantes
Affichages
Actions

thread_create

De cppreference.com
< c‎ | thread

 
 
Bibliothèque de support fil
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.
L'exclusion mutuelle
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.
Appelez fois
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.
Les variables de condition
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.
Stockage local des threads
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.
 
Déclaré dans l'en-tête <threads.h>
int thrd_create( thrd_t *thr, thrd_start_t func, void *arg );
(depuis C11)
Crée un nouveau thread exécutant la fonction func. La fonction est appelée comme 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.
En cas de succès, l'objet pointé par thr est réglé à l'identifiant du nouveau thread .
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.
L'achèvement de cette fonction est synchronisé avec le début du fil .
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.

Sommaire

[modifier] Paramètres

thr -
pointeur à l'emplacement de mémoire à mettre l'identifiant du nouveau thread
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 -
fonction à exécuter
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 -
arguments à passer à la fonction
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.

[modifier] Retourne la valeur

thrd_success si la création du nouveau thread a été un succès. Sinon retourne thrd_nomem s'il y avait quantité insuffisante de mémoire ou thrd_error si une autre erreur s'est produite .
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.

[modifier] Notes

Le fil identifie peut être réutilisée pour de nouvelles discussions une fois que le thread a fini et joint ou détaché .
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.

[modifier] Voir aussi

détache un thread
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.

(fonction) [edit]
blocs jusqu'à ce qu'un thread se termine
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.

(fonction) [edit]