Guardian Procedure Calls Reference Manual
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|XL] 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 WRITE[X]) and the completion of that operation (that is, a call to
AWAITIO[X|XL]).
WARNING! Modifying nowait WRITE buffers before the AWAITIOX that completes 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 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 AWAITIO[X|XL].
WARNING! Modifying nowait READ buffers before the AWAITIOX that completes 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 AWAITIO[X|XL] unless you initiate a nowait operation before the call. AWAITIOXL
returns the error 26 code directly and does not return CCL. Otherwise, a subsequent call to
FILE_GETINFO_ or FILEINFO shows that an error 26 occurred.
• Error handling
AWAITIOXL returns the error code directly. For AWAITIO[X], pass the file number returned
by AWAITIO[X] to the FILE_GETINFO_ or FILEINFO procedure to determine the cause of the
error. If filenum = -1 (that is, any file) is passed to AWAITIO[X|XL] and an error occurs on
a particular file, AWAITIO[X|XL] returns the file number associated with the error in filenum.
• AWAITIO[X|XL] and edit files
If AWAITIO[X|XL] 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.
OSS Considerations
When an OSS process calls AWAITIO[X|XL] and an OSS signal occurs, the OSS function completes
with error 4004 (EINTR). Even if AWAITIO[X|XL] is used to wait for completion (timelimit
<>0D) and a particular file is specified (filenum <> -1), this is not considered a completion and
the oldest I/O operation against the file is not canceled. Call AWAITIO[X|XL] again to complete
the I/O operation.
AWAITIO[X|XL] Procedures 83