Skip to content

WaitOnEvent

Waits for bits on an event, then clears the bits it returns.

Library helper

Implemented in zuzu.h on top of the syscalls; it has no syscall number of its own.

EventWaitResult WaitOnEvent(Handle ev, Duration timeout, EventWord mask, bool waitall);

Parameters

Name Direction Description
ev in Event handle with PERM_WAIT.
timeout in Milliseconds to wait, or TIMEOUT_POLL / TIMEOUT_INFINITE.
mask in Bits to wait for (bits 0-30); 0 means all bits.
waitall in If true, wait until every bit in mask is pending; otherwise any one of them is enough.

Returns

The unpacked result; status as for WaitOn().