cnd_wait
Aus 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. |
<metanoindex/>
<tbody> </tbody>| definiert in Header <threads.h>
|
||
int cnd_wait( cnd_t* cond, mtx_t* mutex ); |
(Seit C11) | |
Atomar sperrt den Mutex, auf die
mutex und Blöcke unter der Bedingung, variable, auf den cond bis der Faden durch cnd_signal oder cnd_broadcast signalisiert wird. Der Mutex wieder bevor die Funktion zurückkehrt gesperrt .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.
You can help to correct and verify the translation. Click here for instructions.
Das Verhalten ist undefiniert, wenn der Mutex nicht bereits durch den aufrufenden Thread gesperrt .
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.
You can help to correct and verify the translation. Click here for instructions.
Parameter
| cond | - | Zeiger auf die Zustandsgröße auf blockieren
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 | - | Zeiger auf den Mutex, um für die Dauer des Blocks zu entsperren
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. |
Rückgabewert
thrd_success wenn erfolgreich, thrd_error sonst .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.
You can help to correct and verify the translation. Click here for instructions.
Siehe auch
(C11) |
Blöcke auf einer Zustandsgröße, mit einem 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. (Funktion) |