Specifications

Writing FDT Routines
5.2 Upper-Level FDT Action Routines
Whether an error is found in the I/O request.
Whether the operation is complete.
Whether the I/O operation requires and is ready for device activity.
Any specific I/O function can be processed by only one upper-level FDT action
routine. Although an upper-level routine can call any number of subsequent
routines, it must eventually complete I/O processing by returning the SS$_
FDT_COMPL status (and final $QIO completion status in the FDT_CONTEXT
structure) to its caller, FDT dispatching code in the $QIO system service.
The system-provided upper-level FDT routines, as discussed in Table 5–1, all
call an FDT completion routine that queues an IRP, completes an I/O request,
or aborts an I/O request. These FDT completion routines insert the final $QIO
system service status in the FDT_CONTEXT structure and return SS$_FDT_
COMPL warning status to the upper-level FDT action routine. The upper-level
FDT action routine returns these status values to its caller, FDT dispatching code
in the $QIO system service.
5.2.2 FDT Exit Paths
An upper-level FDT action routine completes I/O function invoking one of the
completion macros listed in Table 5–2.
Table 5–2 FDT Completion Macros and Associated Routines
Macro Operation
CALL_ABORTIO Calls EXE_STD$ABORTIO to abort an I/O request.
An FDT routine that discovers a device-independent error should
always use this method of exiting. Inability to gain access to a
data buffer or an error in the specification of the I/O request are
examples of device-independent errors.
CALL_
ALTQUEPKT
Calls EXE_STD$ALTQUEPKT to call an alternate start-I/O routine
in the driver (specified in the driver dispatch table at offset
DDT$PS_ALTSTART_2) that synchronizes requests for activity
on a device unit and initiates the processing of I/O requests.
The FDT routine uses this exit method when it has successfully
completed all driver preprocessing and the request requires device
activity. However, in contrast to EXE_STD$QIODRVPKT, EXE_
STD$ALTQUEPKT bypasses the device unit’s pending-I/O queue
and the device busy flag; thus, the driver is activated regardless of
whether the device unit is busy. A driver that can handle two or
more I/O requests simultaneously uses this exit method.
(continued on next page)
5–5