next up previous contents index
Next: 18.3.24 pthread_cond_timedwait: Wait on Up: 18.3 POSIX Threads Reference Previous: 18.3.22 pthread_cond_signal: Wakeup one

18.3.23 pthread_cond_wait: Wait on a condition variable

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);

DESCRIPTION

The current thread is made to wait until the condition variable is signaled or broadcast. The mutex is released prior to waiting, and reacquired before returning.

PARAMETERS

cond
A pointer to the condition variable object.
mutex
A pointer to the mutex object.

RETURNS

Returns zero on success.

RELATED INFORMATION

pthread_cond_signal, pthread_cond_broadcast, pthread_cond_timedwait



University of Utah Flux Research Group