GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-58
Q^CP[X]
The Q^CP procedure moves global data within a user’s named or private global data
block to the checkpoint buffer located in extended memory. The Q^CPX procedure
moves extended memory data to the checkpoint buffer. Up to four data areas can be
moved to the checkpoint buffer with a single call to Q^CP[X].
Multiple calls to Q^CP[X] can be done before calling DO^CP or ^CHECKPOINT.
Q^CP[X] queues data until the number of words in the checkpoint buffer, including
three control words per data area copied, exceeds the size set by the MAXCPSIZE
configuration parameter.
If the checkpoint buffer overflows during a call to Q^CP[X] from the USER^BACKUP
exit, TSCODE automatically writes the current checkpoint buffer to the backup
process.
status returned value
INT:value
indicating whether GDSX is running as a process pair. The value of status is one
of the following:
If Q^CP[X] is called from a user exit other than USER^BACKUP and the
checkpoint buffer overflows, the backup process is terminated and 0 is returned in
status.
Caution. If the checkpoint buffer overflows or the maximum checkpoint size is reached during
a call to Q^CP[X] from a user exit other than USER^BACKUP, the backup process is
terminated and Q^CP[X] returns 0. To prevent this, ensure that MAXCPSIZE is large enough
(the default size is 4,096 words). If the backup process is terminated, it is still the caller’s
responsibility to release the semaphore with GIVE^CPSEM.
Caution. If a task owning one or more semaphores stops, the primary GDSX process stops.
If a task owning one or more semaphores faults with the noretn parameter of FAULT equal to
1, the primary GDSX process stops.
Caution. It is recommended that you use ^CHECKPOINT(2) instead of Q^CPX and DO^CP to
checkpoint extended memory buffers. Because DO^CP checkpoints directly across to the
backup process, using Q^CPX and DO^CP to checkpoint extended memory buffers works only
for pool areas allocated in exactly the same area of memory in both the primary and the
backup.
status := Q^CP[X] ( data1 !
i
,bytes1 !
i
,[ data2 , bytes2 ]
,[ data3 , bytes3 ]
,[ data4 , bytes4 ] );
0 GDSX does not have a backup process
1 GDSX has a backup process