GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-30
GETEXTPOOL
CALL P1;
CALL Q^CP(.....);
.
.
IF P2^GOT^CP^SEM THEN
BEGIN
CALL DO^CP;
CALL GIVE^CPSEM;
END;
END;
The procedure that acquires the semaphore is responsible for sending the
accumulated checkpoint buffer to the backup.
Assume that the caller of P2 does not own the checkpoint semaphore. When P2 is
called, the initialization of p2^got^cp^sem thus acquires the semaphore and
p2^got^cp^sem is set to 1. When P1 is entered, GET^CPSEM is again called
during initialization of p1^got^cp^sem . In this case, the task already owns the
checkpoint semaphore, so p1^got^cp^sem is initialized to zero. P1 does not
checkpoint the data nor does it release the checkpoint semaphore, because
p1^got^cp^sem is zero. When control is returned to P2, the data is checkpointed
and the semaphore is released, because p2^got^cp^sem is nonzero.
When P1 is called elsewhere, and the caller does not own the checkpoint
semaphore, P1 acquires the semaphore, checkpoints the data, and releases the
semaphore.
GETEXTPOOL
This procedure allocates extended memory pool space for the calling task from one of
four extended memory pools:
Pool 1, the shared extended pool
Pool 2, the private extended pool
Pool 10, the extended buffer pool
Pool 11, the extended message pool
Before issuing a call to GETEXTPOOL for one of the four memory pools, you allocate
the maximum pool space to be used by setting the POOLSIZE configuration
parameter.
The maximum size of the shared extended pool, pool 1, is established by setting
POOLSIZE with a TACL PARAM command or by setting the poolsize variable within
the USER^INIT^CONFIG^PARAMS user exit. POOLSIZE specifies the maximum pool
size in words that all user tasks may share. TSCODE allocates an extended memory
area of size POOLSIZE multiplied by 2 bytes for the shared extended pool. The
default for POOLSIZE is 16,392 words.
The maximum size of the private extended pool, pool 2, is established by setting the
TASKPOOLSIZE configuration parameter with a TACL PARAM command or by setting