Specifications

Device Driver Entry Points
Cancel-I/O Routine
Cancel-I/O Routine
Prevents further device-specific processing of the I/O request currently being
processed on a device.
Specified in
Supply the address of the cancel-I/O routine in the cancel argument of the
DDTAB macro. The macro places this address into DDT$L_CANCEL. Many
drivers specify the system routine IOC$CANCELIO as their cancel-I/O routine.
Called by
System routines call a driver’s cancel-I/O routine under the following
circumstances:
When a process issues a Cancel-I/O-on-Channel system service ($CANCEL)
When a process deallocates a device, causing the device’s reference count
(UCB$W_REFC) to become zero (that is, no process I/O channels are assigned
to the device)
When a process deassigns a channel from a device, using the $DASSGN
system service
When the command interpreter performs cleanup operations as part of image
termination by canceling all pending I/O requests for the image and closing
all image-related files open on process I/O channels
Synchronization
A cancel-I/O routine begins execution at fork IPL, holding the corresponding fork
lock in a multiprocessing environment. It must return control to its caller in this
context.
Context
A cancel-I/O routine executes in kernel mode in process context.
Register usage
A cancel-I/O routine must preserve the contents of all registers except R4 and R5.
Input
Location Contents
R2 Channel index number
R3 Contents of UCB$L_IRP (address of current IRP, if
any, for device)
R4 Address of PCB of the process for which the I/O
request is being canceled
R5 Address of UCB
4–4