Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
270 Chapter9
Intrinsics Reference (cont)
IODONTWAIT
IODONTWAIT
Initiates completion operations for an I/O request. Allows program
processing to continue before an I/O operation completes.
Syntax
I16 I16V UDS 16 U16
fnum
:=IODONTWAIT(filenum,
buffer
,
length
,
cstation
);
Use
The IODONTWAIT intrinsic initiates completion operations for an I/O
request and returns control to the calling process even if no I/O has
completed.
A call to either IODONTWAIT or its companion intrinsic, IOWAIT,
must follow every read or write request posted against a file that was
opened with NOWAIT I/O specified in the FOPEN or HPFOPEN call.
(The process must have been running in privileged mode for NOWAIT
I/O to have been specified.)
When NOWAIT I/O is used, the parameters associated with the
IODONTWAIT or IOWAIT call receive the values that normally would
have been returned in the read or write request being processed. See
the parameter explanations for what these values represent.
If you call IODONTWAIT and no I/O has completed, control is returned
to the calling process, CCE is returned, and the result of IODONTWAIT
is zero.
If you call IOWAIT and no I/O has completed, the calling process is
suspended until some I/O completes.
Functional Return
fnum 16-bit signed integer (assigned functional
return)
The file number for which the completion occurred. If
no completion occurred, zero is returned.
Parameters
filenum 16-bit signed integer by value (required)
The file number for which there is a pending I/O
request. If you specify 0, the IODONTWAIT intrinsic
checks for any I/O completion.
buffer user-defined structure (optional)