Specifications
Operating System Routines
IOC$WFIKPCH, IOC$WFIRLCH
Synchronization
When it is called, IOC$WFIKPCH or IOC$WFIRLCH assumes that the local
processor has obtained the appropriate synchronization with the device database:
• In a uniprocessing environment, the processor must be executing at device
IPL or above.
• In a multiprocessing environment, the processor must own the appropriate
device lock, as recorded in the unit control block (UCB$L_DLCK) of the device
unit from which the interrupt is expected. This requirement also presumes
that the local processor is executing at the device IPL associated with the
lock.
Before exiting, IOC$WFIKPCH or IOC$WFIRLCH achieves the following
synchronization:
• In a uniprocessing environment, it lowers the local processor’s IPL to the IPL
saved on the stack.
• In a multiprocessing environment, it conditionally releases the device lock,
so that if the caller of the driver fork thread (the caller’s caller) previously
owned the device lock, it will continue to hold it when the routine exits.
IOC$WFIKPCH or IOC$WFIRLCH also lowers the local processor’s IPL to
the IPL saved on the stack.
Description
A driver fork process calls IOC$WFIKPCH to wait for an interrupt while keeping
ownership of the controller’s data channel; IOC$WFIRLCH, by contrast, releases
the channel.
Either routine performs the following operations:
• Adds 2 to the address on the top of the stack to determine the address of
the next instruction in the driver fork thread after the invocation of the
WFIKPCH or WFIRLCH macro. (Note that the macro places the relative
offset to the timeout handling routine in the word following the JSB to
IOC$WFIKPCH or IOC$WFIRLCH.) It pops this address into the UCB fork
block (UCB$L_FPC) so that the driver’s interrupt service routine can resume
execution of the driver fork thread with a JSB instruction.
• Moves contents of R3 and R4 into the UCB fork block.
• Sets UCB$V_INT to indicate an expected interrupt from the device unit.
• Sets UCB$V_TIM to indicate that the operating system should check for
timeouts from the device unit.
• Determines the timeout due time from the timeout value, now at the top of
the stack, and EXE$GL_ABSTIM, and stores the result in UCB$L_DUETIM.
• Clears UCB$V_TIMOUT to indicate that the unit has not timed out.
3–144