GDSX Manual
Service Routines
Extended General Device Support (GDSX) Manual–134303
8-37
GET_PROCESS_HANDLE_FROM_NAME_
•
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;
STRING .BUFS; !String pointer
! Note that a string pointer will
! not work for the
! message pool (pool 1)
STRUCT .STRCT(SOME^STRUCT) = BUF; ! Point user structure to
! address returned.
.
.
TICKS := 300; ! Wait maximum of 3 seconds.
@BUF := GETLOCALPOOL(0, BUFSZ, TICKS); ! Get local buffer
! pool address
! (lower data stack).
IF @BUF = 0 THEN
BEGIN ! do error handling
END;
@BUFS := @BUF '<<' 1; ! Initialize string pointer.
.
GET_PROCESS_HANDLE_FROM_NAME_
This procedure returns the process handle of a process created by USCODE.
status returned value
INT:value
status := GET_PROCESS_HANDLE_FROM_NAME_ ( name:length !
i:i
,processhandle ); ! o