GDSX (Extended General Device Support) Manual
Service Routines
Extended General Device Support (GDSX) Manual—529931-001
8-11
^AWAITIO[X]
CALL ^AWAITIO(F2); !Complete write to F2
.
.
CALL WAIT^EVENT(DISP^IOC); !Wait for F1 write to complete
.
.
If the ^WRITE to file F1 completes before the ^WRITE to F2, TSCODE’s
implementation of ^AWAITIO calls WAIT^EVENT(DISP^IOC .. ) and awakens on
the resulting IOC event for F1, but, not finding an I/O completion for F2 (by a call to
^LISTEN), will proceed to call WAIT^EVENT(DISP^IOC .. ) again. At this point the
IOC event from the completion of the ^WRITE to F1 has been cleared (see the
description of the WAIT^EVENT on page 8-86). When the WRITE to F2
completes, ^AWAITIO returns, but because the IOC event from the completion of
the ^WRITE to F1 has been lost, the last call to WAIT^EVENT never completes.
This kind of problem can occur if you generate two events of the same priority as
defined by WAIT^EVENT, for example, two DISP^IOC events, two DISP^ITC
events, and so on.
•
If you want USCODE to provide calls to ^AWAITIO[X] in order to wait for I/O
completion on ^DEVICEINFO2, ^FILE_GETINFOBYNAME_, and
^PROCESS_CREATE_ service routines, as would be done for typical nowaited
Guardian procedure calls, you must set the PROCNOWAIT configuration
parameter to 1. If you want TSCODE to supply AWAITIO[X] calls to complete
these nowaited I/Os, you set PROCNOWAIT to 0. See the description of
PROCNOWAIT on page 2-70 for more information.
•
^AWAITIOX does not allow a segment-id parameter.
•
The tag parameter returns the nowait I/O tag supplied when the I/O was initiated.
If no tag was supplied, -1D is returned.
•
The buffer-addr parameter returns the address of the buffer on which the I/O
completed. Where ^READUPDATE is called without a buffer parameter, GDSX
allocates a buffer and passes its address to you here. The size of this buffer is the
maximum of the $RECEIVE message size and the maximum reply size for the
request. It is your responsibility to return this buffer through a call on
PUTLOCALPOOL.
•
When ^AWAITIO[X] is called on the pseudo-$RECEIVE file, a READUPDATE
should be posted against the pseudo-$RECEIVE file. When this is not the case,
an error 26 is returned from ^AWAITIO[X]:
AWAITIO or CANCEL attempted on a file with no outstanding
operations.
USCODE should always check the return condition code for CCL or CCG. If the
condition code is CCE, the ^AWAITIO[X] completed successfully. If CCE is not
returned, USCODE should call ^FILEINFO for further examination.
CALL ^AWAITIO (......);
IF <> THEN