Return Value
Except in the case of [ETIMEDOUT], all these error checks shall act as if they were performed immediately at the beginning of processing for the function and shall cause an error return, in effect, prior to modifying the state of the mutex specified by mutex or the condition variable specified by cond.
Upon successful completion, a value of zero shall be returned; otherwise, an error number shall be returned to indicate the error.
Errors
The pthread_cond_timedwait() function shall fail if:
-
ETIMEDOUT
- The time specified by abstime to pthread_cond_timedwait() has passed.
The pthread_cond_timedwait() and pthread_cond_wait() functions may fail if:
-
EINVAL
- The value specified by cond, mutex, or abstime is invalid. EINVAL
- Different mutexes were supplied for concurrent pthread_cond_timedwait() or pthread_cond_wait() operations on the same condition variable. EPERM
- The mutex was not owned by the current thread at the time of the call.
These functions shall not return an error code of [EINTR].