cnd_timedwait
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_timedwait( cnd_t* restrict cond, mtx_t* restrict mutex, const struct timespec* restrict time_point ); |
(Seit C11) | |
Atomar sperrt der Mutex, auf den durch
mutex und blockiert unter der Bedingung, auf die variablen cond bis der Faden durch cnd_signal oder cnd_broadcast oder bis der TIME_UTC basierenden Zeitpunkt, auf den durch time_point erreicht 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, or until the TIME_UTC based time point pointed to by time_point has been reached. 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. |
| duration | - | Zeiger auf ein Objekt angeben Timeout-Zeit zu warten, bis
Original: pointer to a object specifying timeout time to wait until 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_timedout wenn die Timeout-Zeit erreicht wurde, bevor die Mutex gesperrt ist, oder thrd_error wenn ein Fehler aufgetreten .Original:
thrd_success if successful, thrd_timedout if the timeout time has been reached before the mutex is locked, or thrd_error if an 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.
Siehe auch
(C11) |
Blöcke auf einer Zustandsgröße Original: blocks on a condition variable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |