No matching definitions.

tur/condvar

stdlib/condvar.tur

POSIX condition variable (pthread_cond_t) wrapped as ptr<void>.

Since: Phase T19-C

defn

condvar-new

(condvar-new :ptr<void>)

allocate and initialise a new POSIX condition variable.

An opaque ptr<void> handle to a heap-allocated pthread_cond_t.

(let [c (condvar-new)] ...)  ; => ptr<void>

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.

ccondvar handle returned by condvar-new
mmutex handle (from mutex-new) that the caller already holds
(condvar-wait c m)

Since: Phase T19-C

defn

condvar-signal

(condvar-signal [c :ptr<void>] :nil)

wake one thread waiting on the condition variable.

ccondvar handle returned by condvar-new
(condvar-signal c)

Since: Phase T19-C

defn

condvar-broadcast

(condvar-broadcast [c :ptr<void>] :nil)

wake all threads waiting on the condition variable.

ccondvar handle returned by condvar-new
(condvar-broadcast c)

Since: Phase T19-C

defn

condvar-free

(condvar-free [c :ptr<void>] :nil)

destroy the condition variable and release its memory.

ccondvar handle returned by condvar-new
(condvar-free c)

Since: Phase T19-C