Manipulation

After door is opened by normal open() call all further access to it is through special ioctl() commands and, of course, ultimate explicit or implicit close().

Table 2-1. Doors ioctl() commands

NameSynopsisDescription
DOOR_INIT

int ioctl (int doorfd, DOOR_INIT, door_setup *setup);

initialize door: set up number and type of arguments passed by clients, signal notification, bootstrap stacks etc. Called by server process to set door up.
DOOR_EXIT

int ioctl (int doorfd, DOOR_EXIT, int return_code);

terminate active door invocation for the current process and return into caller VM with given return code. This is caller by server code when door execution is completed.
DOOR_ENTER

int ioctl (int doorfd, DOOR_ENTER, door_arg_data *args);

start door invocation. Pass arguments to the server. This is called by client.
DOOR_ARGS

int ioctl (int doorfd, DOOR_ARGS, door_arg_pass *args);

called by server code after thread switched from the bootstrap stack to the per-invocation stack. Kernel fills passed structure with arguments provided by the client.