Stacking Saved Contexts for Nested setjmpx Calls
The kernel supports nested calls to the setjmpx kernel service.
The setjmpx kernel service implements the stack of saved contexts by maintaining a linked list of context information anchored in the machine state save area. This area is in the user block structure for a process. Interrupt handlers have special machine state save areas.
An initial context is set up for each process by the initp kernel service for kernel processes and by the fork subroutine for user processes. The process terminates if that context is resumed.