Espaces de noms
Variantes
Affichages
Actions

cnd_wait

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.
 
Defined in header <threads.h>
int cnd_wait( cnd_t* cond, mtx_t* mutex );
(depuis C11)
Verrouille atomiquement le mutex pointé par mutex et bloque sur la variable de condition pointé par cond jusqu'à ce que le fil est signalée par cnd_signal ou cnd_broadcast. Le mutex est verrouillé à nouveau avant le retour de la fonction .
Original:
Atomically locks the mutex pointed to by mutex and blocks on the condition variable pointed to by cond until the thread is signalled by cnd_signal or cnd_broadcast. The mutex is locked again before the function returns.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le comportement est indéfini si le mutex n'est pas déjà verrouillé par le thread appelant .
Original:
The behavior is undefined if the mutex is not already locked by the calling thread.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Paramètres

cond -
pointeur vers la variable de condition pour bloquer le
Original:
pointer to the condition variable to block on
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mutex -
pointeur vers le mutex pour débloquer pendant toute la durée du bloc
Original:
pointer to the mutex to unlock for the duration of the block
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 en cas de succès, thrd_error autrement .
Original:
thrd_success if successful, thrd_error otherwise.
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

blocs sur une variable de condition, avec un timeout
Original:
blocks on a condition variable, with a timeout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction) [edit]