The pthread_cond_timedwait function

Name

pthread_cond_timedwait -- 

Synopsis

#include <pthread.h>

int pthread_cond_timedwait (pthread_cond_t *cond , pthread_mutex_t *mutex , struct timespec *timeout );

Description

The pthread_cond_timedwait function unlocks the given mutex and places the calling thread into blocked state. When the specified condition variable is signaled or broadcast, or the system time is greater than i or equal to timeout, this function re-locks the mutex and returns to the caller.

Returns

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

Implementation Notes

None