Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (C)
Guardian Procedure Calls Reference Manual522629-013
3-60
CHECKPOINTX Procedure
bufferx-n input
STRING .EXT:ref:*
is the address of the data area to be checkpointed. See “Considerations” for
details.
If
bufferx-n is omitted, a file synchronization block is to be checkpointed and the
file number is specified in the
segment-idn parameter.
count-n input
INT(32):value
contains the number of bytes to be checkpointed if
bufferx-n is provided.
If
bufferx-n is omitted, this parameter is ignored.
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 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 using the
bufferx-n and
count-n parameters. 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.