Specifications
Writing FDT Routines
5.4 FDT Routines for System Buffered I/O
Figure 5–1 Format of System Buffer for a Buffered-I/O Read Function
Process Space
System Buffer
ZK−0927−GE
System Space
Header
Buffer
User
Area
Data
Buffer
Type
Size
User Buffer Address
Address of Data Area
2. If IRP$L_SVAPTE is nonzero, assumes a system buffer was allocated and
checks to see whether IRP$V_FUNC is set in IRP$L_STS.
3. If IRP$V_FUNC is clear, deallocates the system buffer used for the write
operation; if IRP$V_FUNC is set, the special kernel-mode AST copies the
data to the user’s buffer and then deallocates the buffer in addition to
performing other kernel-mode AST functions.
The special kernel-mode AST performs the following steps to complete a buffered
read operation:
1. Obtains the address of the system buffer from IRP$L_SVAPTE.
2. Obtains the number of bytes to write to the user’s buffer from IRP$L_BCNT.
3. Obtains the address of the user’s buffer from the second longword of the
system buffer header.
4. Checks for write accessibility on all pages of the user’s buffer.
5. Copies the data from the system buffer to the process buffer.
6. Deallocates the system buffer. Note that the system uses the size listed in the
buffer’s header to deallocate the buffer.
5–9










