Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual522629-013
2-48
AWAITIO[X] Procedures
Reference parameters for AWAITIOX
The reference parameters for AWAITIOX can be in the user’s stack or in an
extended data segment. The reference parameters cannot be in the user’s code
space.
The reference parameters for AWAITIOX must be relative extended addresses;
they cannot be absolute extended addresses.
If the reference parameters for AWAITIOX address an area in a selectable
extended data segment, the segment must be in use at the time of the call to
AWAITIOX. (Flat segments allocated by a process are always accessible to the
process.)
AWAITIOX and buffer in extended data segment
If the
buffer is in a flat extended data segment, the segment must be allocated at
the time of the call to AWAITIOX.
If the
buffer is in a selectable extended data segment, the segment need not be
in use at the time of the call to AWAITIOX. However, the segment must be
allocated at the time of the call to AWAITIOX.
Normal order of I/O completion (without SETMODE 30)
If SETMODE 30 is not set, the oldest incomplete I/O operation always completes
first; therefore, AWAITIO[X] completes I/O operations associated with the particular
open of a file in the same order as initiated.
Order of I/O completion with SETMODE 30
Specifying SETMODE 30 allows nowait I/O operations to complete in any order.
However, I/O operations that complete at the same time return in the order issued
(unless SETMODE 30 is specified with
param1 set to 3). An application process
that uses this option can use the
tag parameter to keep track of multiple I/O
operations associated with a file open.
Operation timed out
If an error indication is returned on a call where either
timelimit = 0 or
filenum = -1 was specified, and a subsequent call to FILE_GETINFO_ or
FILEINFO shows that an error 40 occurred, the operation is considered incomplete
and AWAITIO[X] must be called again.
Write buffers
The contents of a buffer should not be altered between the initiation of a nowait I/O
operation (for example, a call to WRITE[X]) and the completion of that operation
(that is, a call to AWAITIO[X]).
Read buffers
If the file was opened by FILE_OPEN_ , or if it was opened by OPEN and
SETMODE 72 was called with
param1 set to 0, the buffer used for a read