Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (C)
Guardian Procedure Calls Reference Manual522629-013
3-53
CHECKPOINTMANYX Procedure
[2] Is the file number.
[3] (Is reserved.)
[4] (Is reserved.)
If the item is a data area:
[0:1] Is the length in bytes.
[2] Is the segment ID. (If it is -1, the address is in the stack or current
segment.)
[3:4] Is the extended address.
Considerations
Checkpointing the stack
Checkpointing the entire data stack has the effect of providing a restart point for
the backup process. The
stack-origin parameter gives you the option of
specifying how far into the stack to start checkpointing. Although native stacks
grow downward while TNS stacks grow upward, the effect is the same—all data
from
stack-origin to the growing tip of the stack is checkpointed.
The rules for specifying the
stack-origin address, however, are different for
TNS processes and native processes. In a TNS process, you can include global
variables to be checkpointed with the stack data, because the global variables
immediately precede the stack; thus you can checkpoint all global variables with
the stack by specifying a
stack-origin address of zero (0).
In a native process, you cannot checkpoint global data with the stack, because
global variables are not adjacent to the stack. If the
stack-origin parameter is
specified for a native process, it must point to a location within the data stack itself.
To checkpoint global data, you must do so explicitly by providing a descriptor for
each area of global data you want to checkpoint. Note that this approach works for
TNS processes as well as for native processes; therefore a program written this
way can be compiled for either architecture.
Establishing the
stack-origin address can be done in several ways. The
following approaches work for both TNS and native processes:
To checkpoint the entire stack, set the stack-origin address to -3. In a
TNS process this value is the equivalent of the initial -L value in the TNS stack
area. In a native process this value indicates the start of the main stack.
To checkpoint starting from the origin of an arbitrary procedure, introduce a
lower procedure to obtain its stack address. For example, assume a