OSWaitEventWithTimeout

Syntax

#include <cafe/os.h>

BOOL OSWaitEventWithTimeout(OSEvent* event, OSTimeNanoseconds timeout);

Parameters

event OSEvent to wait for a signal.
timeout Minimum number of nanoseconds to wait before returning FALSE.

Adhering to an exact number of nanoseconds is not guaranteed. This function only has a time-inspection granularity roughly equivalent to the processor timebase.

Return Values

TRUE if the OSEvent event was signaled. FALSE if the timeout elapsed before the event was signaled.

Description

OSWaitEventWithTimeout causes the thread to block until the OSEvent is signaled or the timeout threshold is reached. If the OSEvent is already in the signaled state, this function returns without waiting.

If timeout is set to 0, check the state of OSEvent and then return immediately.

Do Not Call From

Callbacks Do not call this function from any callback function.

See Also

OSInitEvent
OSSignalEvent
OSSignalEventAll
OSWaitEvent
OSResetEvent

Revision History

2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup pass.
2011/03/02 Added the description of the behavior when timeout is set to 0.
2010/12/15 Initial version.


CONFIDENTIAL