tur/condvar
stdlib/condvar.tur
defn
condvar-new
(condvar-new :ptr<void>)
allocate and initialise a new POSIX condition variable.
Since: Phase T19-C
defn
condvar-wait
(condvar-wait [c :ptr<void> m :ptr<void>] :nil)
atomically release the mutex and wait for a signal on the condition variable.
Parameters
| c | condvar handle returned by condvar-new | |
| m | mutex handle (from mutex-new) that the caller already holds |
Since: Phase T19-C
defn
condvar-signal
(condvar-signal [c :ptr<void>] :nil)
wake one thread waiting on the condition variable.
Parameters
| c | condvar handle returned by condvar-new |
Since: Phase T19-C
defn
condvar-broadcast
(condvar-broadcast [c :ptr<void>] :nil)
wake all threads waiting on the condition variable.
Parameters
| c | condvar handle returned by condvar-new |
Since: Phase T19-C
defn
condvar-free
(condvar-free [c :ptr<void>] :nil)
destroy the condition variable and release its memory.
Parameters
| c | condvar handle returned by condvar-new |
Since: Phase T19-C