decisions DECIDED

12. Call/Reply IPC: a one-shot reply capability

Decided and built 2026-07-22 (milestone 12). The design was worked out ahead of time in notes/ipc-naming.md and parked in "Open design ideas" against two triggers. This is where it lands, because it widens the §4 (kernel shape: a microkernel) system call boundary and so is owed a numbered decision.

The gap it closes

IPC names an endpoint and the sender is anonymous (notes/ipc-naming.md), so a server that RECVs a request cannot reply to the specific caller. The workaround was a second reply endpoint wired per client at spawn, correct only while a server's client set is static and it is single-threaded (the console server). It does not serve anonymous clients, and nothing structural stops a misrouted reply, a double reply, or a stale reply landing on a client that has moved on.

The surface, and why it is this small

One new endpoint method and one new object. The system call count stays at three (exit/yield/invoke).

The server side reuses RECV_CAP rather than growing a new receive method: receiving a call looks exactly like receiving a delegated capability, plus a second data word. The one asymmetry with SEND is honest and worth stating: a CALL carries two words, not three, because the third register holds the reply handle. That is fine under §10's rule that IPC carries control and bulk moves by frame.

What it buys, as kernel guarantees rather than server discipline

  1. Reply to an anonymous caller, no pre-wiring: the kernel mints the cap; the server never knew the caller.
  2. One-shot: consumed on use, so a second reply is NoSuchSlot. No double reply, no hoarding.
  3. This caller, not another: Reply(Tid) names the exact blocked caller; misrouting is unrepresentable.

Three tests hold the line: a_call_gets_a_reply (round trip, one endpoint), a_reply_reaches_the_ caller_that_called (two callers outstanding, each gets its own reply), and, through the real system call path at EL0, a_process_calls_a_server_and_the_reply_is_one_shot (which also checks that the second reply is refused).

Deferred, deliberately

One rule the mechanism assumes

A CALL endpoint is served with RECV_CAP. A plain RECV cannot furnish the reply capability, so the kernel delivers the words but leaves the caller blocked rather than wake it with its own request masquerading as a reply. Servers use the right method by protocol; the guard is there so misuse hangs (bounded by the no-timeout gap above) rather than mis-serves.