Multithreaded Programming Guide

pthread_cond_timedwait Return Values

pthread_cond_timedwait() returns zero after completing successfully. Any other return value indicates that an error occurred. When either of the following conditions occurs, the function fails and returns the corresponding value.


EINVAL

Description:

cv, mp, or abstime points to an illegal address.


EINVAL

Description:

Different mutexes were supplied for concurrent pthread_cond_timedwait() operations on the same condition variable.


ETIMEDOUT

Description:

The time specified by abstime has passed.


EPERM

Description:

The mutex was not owned by the current thread at the time of the call.

The timeout is specified as a time of day so that the condition can be retested efficiently without recomputing the value, as shown in Example 4–9.