Doors Overview
Doors are a fast light-weight RPC mechanism for secure control transfer between processes on
the same machine. A door is created when a process known as the door server
calls door_create
()
(3DOOR) with a server function and
receives a file descriptor. The file descriptor can be passed to other
processes or attached to the file system using fattach
().
A client process, which has the file descriptor, can then invoke the door
process by calling door_call
(). The client can also pass
data and descriptors including other door descriptors. As a result of the
call to door_call
(), the client thread blocks and a
thread in the door server wakes up and starts running the server function.
When the server function is completed, the function calls
door_return
()
to pass optional data and
descriptors back to the client. door_return
()
also
switches control back to the client; the server thread gets blocked in the
kernel and does not return from the door_return
()
call.
Doors are described in the doors library
libdoor
(3LIB).