Specifications

Writing FDT Routines
5.2 Upper-Level FDT Action Routines
Table 5–2 (Cont.) FDT Completion Macros and Associated Routines
Macro Operation
Be aware that programming a device driver to process simultaneous
I/O requests requires detailed knowledge of the internal design of
the operating system. A driver that uses the CALL_ALTQUEPKT
macro must not only maintain its internal queues but must also
synchronize those queues with the unit’s pending-I/O queue, which
the operating system maintains. In addition, if a driver processes
more than one IRP at the same time, it must use separate fork
blocks. Such a driver completes the processing of I/O requests
by using the CALL_POST macro calling COM_STD$POST. This
routine places each IRP in the systemwide I/O postprocessing queue
and returns control to the driver. The driver can then fetch another
IRP from an internal queue. For more information about COM_
STD$POST, see OpenVMS AXP Device Support: Reference.
When the alternate start-I/O routine finishes, it returns control to
EXE_STD$ALTQUEPKT. EXE_STD$ALTQUEPKT then returns
to the FDT routine that called it. The FDT routine performs any
necessary postprocessing, returning the SS$_FDT_COMPL status to
FDT dispatching code in the $QIO system service
CALL_FINISHIO Moves the contents of R0 and R1 to IRP$L_IOST1 and IRP$L_
IOST2, respectively and calls EXE_STD$FINISHIO to insert the
IRP in the I/O postprocessing queue. EXE_STD$FINISHIO returns
SS$_FDT_COMPL status to the $QIO system service and SS$_
NORMAL status (in the FDT_CONTEXT structure) to the caller of
$QIO.
An FDT routine that discovers a device-dependent error should
always return status using CALL_FINISHIO or CALL_FINISHIOC.
CALL_FINISHIOC Calls EXE_STD$FINISHIO to perform the same operations as
CALL_FINISHIO except CALL_FINISHIOC clears the second
longword of the final I/O status.
CALL_FINISHIO_
NOIOST
Calls EXE_STD$FINISHIO to perform the same operations as
CALL_FINISHIO except CALL_FINISHIO_NOIOST does not fill in
the I/O status fields of the IRP.
CALL_IORSNWAIT Calls EXE_STD$IORSNWAIT. Reserved to Digital.
CALL_
QIOACPPKT
Calls EXE_STD$QIOACPPKT. Reserved to Digital.
(continued on next page)
5–6