Guardian Procedure Calls Reference Manual

Replying to queued messages
Several interprocess messages can be read and queued by the application process before a
reply must be made. The maximum number of messages that the application process expects
to read before a corresponding reply must be specified in the receive-depth parameter
to the FILE_OPEN_ or OPEN procedure.
If $RECEIVE is opened with receive-depth = 0, only FILE_READ64_ can be called;
FILE_READUPDATE64_ and FILE_REPLY64_ fail with error 2 ("operation not allowed on this
type of file").
Using the message-tag
If more than one message is queued by the application process (that is, receive-depth>
1), a message tag associated with each incoming message must be obtained in a call to the
FILE_GETRECEIVEINFOL_ (or FILE_GETRECEIVEINFO_ or LASTRECEIVE or RECEIVEINFO)
procedure immediately following each call to FILE_READUPDATE64_. To direct a reply back
to the originator of the message, the message tag associated with the incoming message
returns to the system in the message-tag parameter to the FILE_REPLY64_ procedure. If
messages are not queued (that is, sync-or-receive-depth = 1), the message-tag is
not needed.
Error handling
The error-return parameter can be used to return an error indication to the requester in
response to the open, CONTROL, SETMODE, and CONTROLBUF, system messages. The error
returns to the requester when the associated I/O procedure finishes.
Buffer considerations
The buffer and count-written may be in the user stack segment or in an extended
data segment. They cannot be in the user's code space.
If the buffer or count transferred is in a selectable extended data segment, the segment
must be in use at the time of the call. Flat segments allocated by a process are always
accessible to the process.
The transfer size is the same as for procedure REPLYXL.
If the extended address of the buffer is odd, bounds checking rounds the address to the
next lower word boundary and checks an extra byte. The odd address is used for the
transfer.
Related Programming Manual
For programming information about the FILE_REPLY64_ procedure, see the Guardian Programmer's
Guide.
FILE_REPLY64_ Procedure 501