Skip to content

Signal

Sets bits on an event and wakes waiters.

Number Selector Blocking Since
0x09 SVC_SIGNAL — no 2.0
Err Signal(Handle ev_handle, EventWord bits, bool broadcast);

Registers: (event, bits, flags) -> r0 status

Without broadcast, the highest-priority waiter wakes and receives the accumulated bits; with it, all waiters wake. With no waiter, the bits stay set for the next WaitOn().

Parameters

Name Direction Description
ev_handle in Event handle with PERM_SEND.
bits in Bits to set; bit 31 is reserved.
broadcast in Wake every waiter instead of one.

Returns

ZUZU_OK, or an error code.

Errors

Error Condition
ERR_BADARG Bit 31 is set.
ERR_BADHANDLE ev_handle is not a live handle.
ERR_NOPERM ev_handle lacks PERM_SEND, or a bit is claimed by a binding.
ERR_BADTYPE ev_handle is not an event.
ERR_DEAD The event has been destroyed.