Envoy Application Programming Manual

Table Of Contents
File-System Procedures
Envoy Application Programming Manual427159-001
C-6
AWAITIO[X]
segment-id output
INT .EXT:ref:1 (Use with AWAITIOX only)
returns the segment ID of the extended segment containing the buffer when the
operation was initiated. If the buffer is in the user stack segment, segment-id is -1.
Condition Codes
Examples
CALL AWAITIO ( fnum);
fnum is the one-word integer variable returned by the OPEN call opened the particular
communications line. The calling process is suspended indefinitely until an incomplete
I/O operation is completed on the specified line.
file^num = -1;
time^limit := 50D;
CALL AWAITIO (fnum,,,,time^limit);
fnum is the one-word integer variable returned by the OPEN call that opened the
particular communications line. The calling process is suspended for up to half a second
to await an I/O completion on any opened line.
>0D = Wait the specified amount of time for a completion. In this case, time-
limit specifies the desired time interval in .01-second units.
If the AWAITIO[X] call can logically complete an incomplete I/O
operation within the specified time period, it does so, and control passes
to the next sequential statement or instruction in the calling process.
If the AWAITIO[X] call is for a particular line and the incomplete I/O
operation does not complete within the specified time interval, the
operation is cancelled and control passes to the next sequential statement
or instruction in the calling process.
If the AWAITIO[X] call is for any open line and an incomplete I/O
operation does not complete within the specified time, control passes to
the next statement or instruction in the calling process.
-1D = Wait indefinitely for a completion. If the time-limit parameter is
omitted, the AWAITIO[X] call waits indefinitely for a completion.
< (CCL) Indicates that an error occurred (call FILEINFO).
= (CCE) Indicates that the AWAITIO procedure was executed successfully.
> (CCG) Indicates that an outstanding READ operation was completed with a
nonzero MCW.<0:7>.