_GTSSEG - mark a Linkage Segment slot as busy.

(GCOS8 only)

Usage:

C:
   #include <climb.h>
   status = _gtsseg(ptr);
PL6:
   DCL X_GET_SPECIFIC_SEGID ENTRY(1) ALTRET;
   X_GET_SPECIFIC_SEGID(ptr);

Where:

const void *ptr;
points anywhere into the segment whose slot you want to mark as busy. "_gtsseg" extracts the SEGID from this pointer.
int status;
is 0 if the slot is not in the Linkage Segment (i.e. not in the 06000 series). "_gtsseg" also returns 0 if the slot is already in use or if the slot could not be marked as busy. If "_gtsseg" successfully marks a free slot as busy, it returns 1.

Description:

"_gtsseg" marks a slot in the Linkage Segment as busy. This ensures that future calls to "_gtseg" and other SEGID allocation functions will not try to use the slot.

In PL6 programs, X_GET_SPECIFIC_SEGID takes a normal return if it successfully marks a free Linkage Segment slot as busy. Otherwise, it takes an alternate return.

See Also:

expl nsc lib _gtseg
general SEGID allocation routine.
expl nsc lib _frseg
for freeing allocated SEGIDS.
expl nsc lib _gtlseg
for allocating a SEGID that will only be used during the current invocation of the program (one that disappears over an OCLIMB).

Copyright © 1996, Thinkage Ltd.