Guardian Procedure Calls Reference Manual
Considerations
• Sync ID definition
A sync ID is a doubleword, unsigned integer. Each opened process has its own sync ID. Sync
IDs are not part of the message data; rather, the receiver of a message obtains the sync ID
value associated with a particular message by calling FILE_GETRECEIVEINFO[L]_. A file's
sync ID is set to 0 when the file is opened and when the RESETSYNC procedure is called for
that file (RESETSYNC can be called directly or indirectly through the CHECKMONITOR
procedure).
When a request is sent to a process (that is, when a process is the object of a CONTROL,
CONTROLBUF, SETMODE, SETPARAM, open, close, read, write, or WRITEREAD operation),
the system increments the requester's sync ID just before sending the message. (Therefore, a
process' first sync ID subsequent to an open has a value of 0.)
• Duplicate requests
The sync ID allows the server process (that is, the process reading $RECEIVE) to detect duplicate
requests from requester processes. Such duplicate requests are caused by a backup requester
process reexecuting the latest request of a failed primary requester process, or by certain
network failures.
NOTE: Neither a cancelreq operation nor an awaitio[x] timeout completion have any affect
on the sync ID (that is, the sync ID is an ever-increasing value).
Also, the sync ID is independent of the sync depth value specified to FILE_OPEN_ or OPEN.
• Open labels
The open label (receive-info[16]) allows the server to quickly find an open-table entry
without having to search for it. The returned value is the same as that which the server assigned
(when replying to the open message) to the open on which the received message was sent.
• Server process identifying separate opens by the same requester
The file number (receive-info[3]) is used by a server process to identify separate opens
by the same requester process. The returned file number value is the same as the file number
used by the requester to make this request.
Example
error := FILE_GETRECEIVEINFO_ ( receive^info );
Related Programming Manual
For programming information about the FILE_GETRECEIVEINFO[L_ procedures, see the Guardian
Programmer's Guide.
446 Guardian Procedure Calls (F)