Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (C)
Guardian Procedure Calls Reference Manual—522629-013
3-69
CHECKSWITCH Procedure
CHECKSWITCH Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Considerations
Summary
The CHECKSWITCH procedure is called by a primary process to cause the duties of
the primary and backup processes to be interchanged.
The call to CHECKSWITCH contains an implicit call to the CHECKMONITOR
procedure, so that the caller becomes the backup and monitors the execution state of
the new primary process. The backup process must be in the monitor state (that is, in
a call to CHECKMONITOR) for the CHECKSWITCH call to be successful.
Syntax for C Programmers
This passive backup procedure is not supported in C programs. For a comparison of
active backup and passive backup, refer to the
Guardian Programmer’s Guide.
Syntax for TAL Programmers
Parameters
status returned value
INT
returns a status word of the following form:
<0:7> = 1 Could not communicate with backup process, then <8:15> = file-
system error number
<0:7> = 2 then <8:15> =
0 Primary process stopped
1 Primary process abnormally ended
status := CHECKSWITCH;