Skip to content

Bind

Has the kernel set an event bit when a port, task or space needs attention.

Number Selector Blocking Since
0x0A SVC_BIND EVENT_PORT (3), EVENT_TASK (4), EVENT_SPACE (5) no 2.0
Err Bind(EventType type, Handle ev_handle, Handle target, uint32_t bit);

Registers: (type, event, target, bit) -> r0 status

type

target

The bit is set when

EVENT_PORT

port

a caller is queued with nobody receiving

EVENT_TASK

task

the task exits or faults

EVENT_SPACE

space

the space has no live tasks left

If the condition already holds, the bit is set at once. The bit then belongs to the kernel: Signal() may not set it. An object accepts at most four bindings.

Parameters

Name Direction Description
type in EVENT_PORT, EVENT_TASK or EVENT_SPACE.
ev_handle in Event handle with PERM_CNTL.
target in Handle of the matching kind, with PERM_WAIT.
bit in Bit number, 0-30.

Returns

ZUZU_OK, or an error code.

Errors

Error Condition
ERR_BADHANDLE A handle is not live.
ERR_BADTYPE ev_handle is not an event, or target is the wrong kind.
ERR_NOPERM ev_handle lacks PERM_CNTL, or target lacks PERM_WAIT.
ERR_BADARG bit is out of range, or type is unknown.
ERR_DEAD The event or the port has died.
ERR_NOMEM target already has four bindings.