|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <threads.h> | ||
| (since C11) | ||
Atomically unlocks the mutex pointed to bymutex and blocks on the condition variable pointed to bycond until the thread is signalled bycnd_signal orcnd_broadcast, or until theTIME_UTC based time point pointed to bytime_point has been reached, or until a spurious wake-up occurs. The mutex is locked again before the function returns.
The behavior is undefined if the mutex is not already locked by the calling thread.
Contents |
| cond | - | pointer to the condition variable to block on |
| mutex | - | pointer to the mutex to unlock for the duration of the block |
| time_point | - | pointer to an object specifying timeout time to wait until |
thrd_success if successful,thrd_timedout if the timeout time has been reached before the mutex is locked, orthrd_error if an error occurred.
(C11) | blocks on a condition variable (function)[edit] |
C++ documentation forcondition_variable::wait_until | |
C++ documentation forcondition_variable_any::wait_until | |