Guardian Programmer's Guide

Table Of Contents
Using Nowait Input/Output
Guardian Programmer’s Guide 421922-014
4 - 28
Using the FILE_COMPLETE_ Procedure
Completion on Guardian Files
You can use the FILE_COMPLETE_ procedure to complete I/O operations on the
same Guardian files as the AWAITIO[X] procedures. (Refer to the discussion of the
AWAITIO[X] procedures earlier in this section.) It is possible to use the
FILE_COMPLETE_ procedure in parallel with the AWAITIO[X] procedures in your
program.
In general, when completing I/O on Guardian files, the FILE_COMPLETE_ procedure
behaves very similarly to AWAITIO[X], although one major difference is that it uses a
predefined set of files that are enabled for completion. For a list of specific differences
between FILE_COMPLETE_ and AWAITIO[X], refer to the description of the
FILE_COMPLETE_ procedure in the Guardian Procedure Calls Reference Manual.
Completion on OSS Files
Completion on an OSS file means checking for readiness. The file is ready if data can
be sent, if data can be received, or if an exception occurred. The operation of
checking for readiness is equivalent to calling the OSS select() function, except that
the FILE_COMPLETE_ procedure returns ready information for only one file at a time.
It is also possible to use the FILE_COMPLETE_ procedure in parallel with the OSS
select() function in your program.
For more information on the OSS select() function, refer to the select(2) function
reference page either online or in the Open System Services System Calls Reference
Manual.
Calling the FILE_COMPLETE_ Procedure
The only parameter that must be supplied when you call the FILE_COMPLETE_
procedure is an output parameter that returns completion information for the Guardian