Guardian Procedure Calls Reference Manual

tag-or-timeout
input
INT(32):value
is a parameter with two functions depending on the options you specify:
If options.<13> = 1, it is a value you define that helps identify one of several
DEVICEINFO2 operations. The system stores this value until the operation completes, then
returns it to the program in words 1 and 2 of a system message. See Considerations for
more information.
If options.<14> = 1, it is the maximum amount of time, in hundreths-of-second units, to
wait. The value -1D indicates an indefinite wait. If this parameter is omitted, -1D is used.
Considerations
When DEVICEINFO2 is called with a file name that designates a subtype 30 process, it sends
a device-type inquiry system message to the process to determine the device type and subtype
(unless disabled by the options parameter). The format of this completion message is
described in the Guardian Procedure Errors and Messages Manual.
A deadlock occurs if a subtype 30 process calls DEVICEINFO on its own process name.
If you call this procedure in a nowait manner (options.<13> is set to 1), the results are
returned in the nowait DEVICEINFO2 completion message (-41), not in the output parameters
of the procedure. The format of this completion message is described in the Guardian Procedure
Errors and Messages Manual. If error is not 0, no completion message is sent to $RECEIVE.
Errors can be reported either on return from the procedure, in which case error might be
meaningful, or through the completion message sent to $RECEIVE.
The system reports a path error only after automatically making retries.
The nowait option allows any step of the inquiry process to execute asynchronously to the
caller. However, this option guarantees only that simulation inquiries to subtype 30 processes
will be asynchronous. Other parts of the function may or may not be asynchronous.
Process pairs using the nowait option should handle the fact that a DEVICEINFO2 completion
message is delivered only to the process that initiates it, not to the other member of the pair.
You might have the primary process keep the backup process ignorant of outstanding inquiries,
or you might have equivalent DEVICEINFO2 calls at the point where a backup takes over
from the primary process.
For interprocess messages directed to a process pair, file-system errors 200 (ownership) and
201 (path down) are retried automatically to the other member of the pair.
Switching ownership from the primary to the backup process can leave outstanding inquiries.
The CHECKSWITCH procedure automatically discards these as it becomes the backup process.
Programs using another method of switching should tolerate the completions of these irrelevant
inquiries.
Example
CALL DEVICEINFO2 ( INFILE, DEVTYPE, RECLENGTH, D^VERSION );
DEVICEINFO2 Procedure (Superseded by FILE_GETINFOBYNAME_ Procedure or FILE_GETINFOLISTBYNAME_ Procedure) 317