The pthread_cond_wait function

Name

pthread_cond_wait -- 

Synopsis

#include <pthread.h>

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

Description

The pthread_cond_wait function unlocks the given mutex and places the calling thread into a blocked state. When the specified condition variable is signaled or broadcast, this function re-locks the mutex and returns to the caller.

Returns

The pthread_cond_wait function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.

Implementation Notes

None