From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/c/thread%2Fcnd_timedwait.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 devdocs/c/thread%2Fcnd_timedwait.html (limited to 'devdocs/c/thread%2Fcnd_timedwait.html') diff --git a/devdocs/c/thread%2Fcnd_timedwait.html b/devdocs/c/thread%2Fcnd_timedwait.html new file mode 100644 index 00000000..96b61762 --- /dev/null +++ b/devdocs/c/thread%2Fcnd_timedwait.html @@ -0,0 +1,24 @@ +

cnd_timedwait

Defined in header <threads.h>
int cnd_timedwait( cnd_t* restrict cond, mtx_t* restrict mutex,
+                   const struct timespec* restrict time_point );
+
(since C11)

Atomically unlocks 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, 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.

+

Parameters

+ + + +
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

Return value

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.

+

References

See also

+ + +
+
(C11)
blocks on a condition variable
(function)
C++ documentation for condition_variable::wait_until
C++ documentation for condition_variable_any::wait_until
+

+ © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
+ https://en.cppreference.com/w/c/thread/cnd_timedwait +

+
-- cgit v1.2.3