GDSX (Extended General Device Support) Manual
Service Routines
Extended General Device Support (GDSX) Manual—529931-001
8-37
GETLOCALPOOL
defines which local pool to allocate memory for. The value for pool is one of the
following:
size input
INT:value
is the number of words to allocate.
timeout input
INT(32):value
is the maximum number of ticks (10 ms) to wait for space to be allocated.
If this parameter is omitted, the calling task waits the number of ticks defined by
the BUFFERTIMEOUT configuration parameter. BUFFERTIMEOUT has a default
of 1,000 ticks, equal to 10 seconds. If space is not allocated within that time,
TSCODE suspends the calling task with a fault.
Considerations
•
This procedure may cause the calling task to be suspended.
•
A call to ^CHECKPOINT(2) checkpoints all local and extended memory pools
acquired by the calling task.
•
If poolcheck^flag of the DEBUGFLAGS configuration parameter is set, each time a
task is dispatched, TSCODE checks the buffer pool, message pool, extended
buffer pool, and extended message pool for corruption. If corruption is detected,
GDSX stops with abend error 230 or abend error 231. This pool checking is in
addition to that always done when the GETLOCALPOOL and GETEXTPOOL
procedures are called.
Poolcheck^flag can be set when debugging a program and turned off during
production to allow GDSX to run more efficiently.
Example
This example shows the allocation of a 128-word buffer to be word-addressed through
the pointer buf and byte-addressed through bufs. The example also shows the
address equation used to allow the buffer to be referenced as a structure by means of
strct.
.
.
LITERAL BUFSZ = 128; !Words to acquire.
INT TICKS;
INT .BUF;
0 Local buffer pool
1 Local message pool