Guardian Procedure Calls Reference Manual

Normal order of I/O completion (without SETMODE function 30)
If SETMODE function 30 is not set, the oldest incomplete I/O operation always completes
first; therefore, FILE_AWAITIO64_ 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 function 30
Specifying SETMODE function 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 function 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 40 is returned on a call where either timelimit = 0 or filenum = -1 was
specified, the operation is considered incomplete and FILE_AWAITIO64_ must be called
again.
Write buffers
The contents of a buffer must not be altered between the initiation of a nowait I/O operation
(for example, a call to FILE_WRITE64_ and the completion of that operation (that is, a call to
FILE_AWAITIO64_ ).
WARNING! Modifying nowait WRITE buffers before the FILE_AWAITIO64_ completes the
WRITE can cause data corruption to or from the opened file. The buffer space must not be
freed or reused while the I/O is in progress.
However, you can alter the contents of a buffer if set SETMODE function 72,1 is called. For
more information, see SETMODE function 72 in Table 44 (page 1319).
Read buffers
If the 64-bit file was opened by FILE_OPEN_, or if it was opened by OPEN and SETMODE
function 72 was called with param1 set to 0, the buffer used for a read operation must not
be used for any other purpose (including another read) until the read operation has been
completed with a call to FILE_AWAITIO64_ .
WARNING! Modifying 64-bit nowait READ buffers before the FILE_AWAITIO64_ that
completes the READ can cause data corruption to or from the opened file. The buffer space
must not be freed or reused while the I/O is in progress.
No nowaited operations
Do not call FILE_AWAITIO64_ unless you initiate a 64-bit nowait operation before the call.
FILE_AWAITIO64_ returns error 26.
Error handling
FILE_AWAITIO64_ returns the error code directly and does not return CCL. If filenum = -1
(that is, any file) is passed to FILE_AWAITIO64_ and an error occurs on a particular file,
FILE_AWAITIO64_ returns the file number associated with the error in filenum.
FILE_AWAITIO64_ and edit files
If FILE_AWAITIO64_ returns after completion of an I/O operation against an EDIT file that
was accessed using the IOEdit procedures, you must call the COMPLETEIOEDIT procedure to
inform the IOEdit software that the operation has finished.
FILE_AWAITIO64_ Procedure 359