thread_create
De cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
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.
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.
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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Voir aussi
(C11) |
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) |
(C11) |
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) |