Skip to content

ReplyRecv

Answers the call in hand (if any), then waits for the next one, in one syscall.

Number Selector Blocking Since
0x06 SVC_REPLY — yes 2.0
SvcResult ReplyRecv(uint32_t xlen, Handle grant_handle, Handle recv_port, Duration timeout);

Registers: (xlen, grant, port, timeout) -> r0 status, r1 marker, r2 length, r3 granted handle

The usual server loop. Returns like WaitOn() on recv_port.

Parameters

Name Direction Description
xlen in Reply length in bytes, at most MSG_BUF_SIZE.
grant_handle in Handle (with PERM_TXFR) to copy to the caller, or -1.
recv_port in Port to receive on, with PERM_WAIT.
timeout in Milliseconds to wait, or TIMEOUT_POLL / TIMEOUT_INFINITE.

Returns

r0 is the status; r1-r3 as for WaitOn() on a port.

Errors

Error Condition
ERR_TIMEOUT No call within timeout.
ERR_OVERFLOW xlen is larger than MSG_BUF_SIZE.
ERR_BADHANDLE recv_port or grant_handle is not a live handle.
ERR_BADTYPE recv_port is not a port.
ERR_NOPERM recv_port lacks PERM_WAIT, or grant_handle lacks PERM_TXFR.
ERR_DEAD recv_port has died.