Specifications

Operating System Routines
EXE$FORK
EXE$FORK
Creates a fork process on the local processor.
Module
FORKCNTRL
Macro
FORK
Input
Location Contents
R5 Address of fork block
00(SP) Return PC of caller
04(SP) Return PC of caller’s caller
FKB$B_FLCK Fork lock index or fork IPL
Output
Location Contents
R3 Destroyed
R4 Fork IPL
FKB$L_FR3 (UCB$L_
FR3)
R3 of caller
FKB$L_FR4 (UCB$L_
FR4)
R4 of caller
FKB$L_FPC (UCB$L_
FPC)
00(SP)
Synchronization
EXE$FORK acquires no spinlocks and leaves IPL unchanged. It returns control
to its caller’s caller.
Description
EXE$FORK saves the contents of R3 and R4 (in FKB$L_FR3 and FKB$L_FR4,
respectively) in the fork block specified by R5, and pops the return PC value from
the top of the stack into FKB$L_FPC.
If FKB$B_FLCK contains a fork lock index, EXE$FORK determines the fork IPL
by using this value as an index into the spinlock IPL vector (SMP$AR_IPLVEC).
EXE$FORK inserts the fork block into the fork queue on the local processor
(headed by CPU$Q_SWIQFL) corresponding to this IPL. If the queue is empty,
EXE$FORK issues a SOFTINT macro, requesting a software interrupt from the
local processor at that fork IPL. Unlike EXE$IOFORK, EXE$FORK does not
disable timeouts by clearing UCB$V_TIM in the UCB$L_STS field.
3–30