Guardian Procedure Calls Reference Manual

SEGMENT_USE_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Example
Related Programming Manual
Summary
The SEGMENT_USE_ procedure selects a particular extended data segment to be currently
addressable by the calling process.
For selectable segments, the call to SEGMENT_USE_ must follow a call to SEGMENT_ALLOCATE_
to make the selectable extended data segment accessible. Although you can allocate multiple
selectable extended data segments, you can access only one at a time.
For flat segments, the call to SEGMENT_USE_ can follow a call to SEGMENT_ALLOCATE_, but
calling SEGMENT_USE_ is unnecessary because all of the flat segments allocated by a process
are always accessible to the process.
Syntax for C Programmers
#include <cextdecs(SEGMENT_USE_)>
short SEGMENT_USE_ ( short new-segment-id
,[ short *old-segment-id ]
,[ __int32_t *base-address ]
,[ short *error-detail ] );
Syntax for TAL Programmers
error := SEGMENT_USE_ ( new-segment-id ! i
,[ old-segment-id ] ! o
,[ base-address ] ! o
,[ error-detail ] ); ! o
Parameters
new-segment-id
input
INT:value
if not -1, specifies the segment ID of the selectable extended data segment to be put into use.
A value of -1 indicates that the current selectable extended data segment should be taken out
of use and that no new segment should be put into use.
If new-segment-id specifies a flat segment, old-segment-id returns the segment ID of
the current in-use selectable segment. The flat segment and the selectable segment remain
addressable by the calling process.
1298 Guardian Procedure Calls (S)