Expand description
IPC syscall wrappers - §8.2.
Typed wrappers so service code cannot accidentally call the wrong syscall number or pass a malformed message size.
Structs§
- Message
- An IPC message as seen by service code.
Enums§
Constants§
Functions§
- call
- Synchronous CALL (syscall 41): send
requesttotargetcarryingreply_grantas a one-shot reply cap, then block onrecv(the caller’s own endpoint, where the reply lands) until the peer replies OR the peer’s endpoint dies. Returns the reply,Err(ReplyDead)if the peer died before replying,Err(EndpointDead)if the peer was already dead when the request was sent, or anotherIpcErroron a failed send. - call_
deadline_ into call, bounded, receiving into a caller-owned buffer.- recv
- Block until a message is available on
endpoint. (§8.2 -recv) - recv_
timeout - Blocking
recvwith a timeout in counter ticks (the kernel waits at least one scheduler tick):Ok(Some(msg))on a message,Ok(None)on timeout,Erron a real error.timeout_cycles == 0blocks forever (likerecv). (syscall 35 -recv_timeout) Lets a driver idle on its interrupt yet still wake on a timer (e.g. for keyboard auto-repeat while a key is held - §12). - recv_
timeout_ into - Receive into a buffer the CALLER owns, returning the byte count.
- send
- Send a message to
endpoint; block if the queue is full. (§8.2 -send) - try_
recv - Non-blocking
recv: returnOk(None)immediately if the endpoint queue is empty,Ok(Some(msg))if a message was waiting. (syscall 34 -try_recv) Lets a busy-polling driver drain interrupt events (§12) without giving up its loop. - try_
send - Send without blocking; return
QueueFullimmediately. (§8.2 -try_send)