a0TimedWaitCondition()

blocks thread on condition variable cond.


Syntax

a0tError a0TimedWaitCondition(
a0tCondition *cond,
a0tmutex *mutex,
const struct timespec *abstime);

Arguments

Namerd/wrDescription
cond read Condition to be signaled.
mutex read Mutex associated to condition variable.
abstime read Maximum time to wait (time-out).

Description

This function is similar to a0WaitCondition() except an error is returned if the system time equals or exceeds the time specified by abstime before the condition cond is signaled or broadcasted, or if the absolute time specified by abstime has already passed at the time of the call. When time-outs occurs the mutex is released and reacquired.

Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0Err...Some error occurred.
A0ErrOkSuccessful completion.

See Also

a0DisposeCondition() a0NewCondition() a0BroadcastCondition() a0WaitCondition() a0SignalCondition()