MPE/iX Intrinsics Reference Manual (32650-90875)
298 Chapter6
Command Definitions (FLUSHLOG-GETUSERMODE)
GETDSEG
to reference the extra data segment in later intrinsic calls.
Assign the extra data segment to an identity that either allows other processes in the job
or session to share the extra data segment, or that declares it private to the calling process.
If the extra data segment is shareable, other processes can obtain its index (through
GETDSEG) and use this index to reference the extra data segment. Thus, the index is a local
name that identifies the extra data segment throughout any process that obtained the
index with the GETDSEG call. The index does not need to be the same value in all processes
sharing the extra data segment. However, the identity is a job-wide or session-wide name
that permits any process to determine the index of the extra data segment. If GETDSEG is
called in user mode, the extra data segment is initially filled with zeros.
When GETDSEG is called in user mode, all subsequent calls to intrinsics that use
index
must be in user mode. When GETDSEG is called in privileged mode, all subsequent calls to
intrinsics that use
index
must be in privileged mode.
When a data segment is created through GETDSEG, sufficient virtual space is allocated by
the system to accommodate the original length of the data segment. This virtual space is
allocated in increments of 512 half words. For example, creation of an extra data segment
with a length of 600 half words results in the allocation of 1024 half words of virtual space.
Condition Codes
CCE (2) Request granted. A new extra data segment was created.
CCG (0) Request granted. An extra data segment with this identity exists already.
CCL (1) Request denied. The following values are returned in
index
:
Value Meaning
%2000 An illegal
length
was specified.
%2001 The process requested more than the maximum allowable number of data
segments.
%2002 Sufficient storage was not available for the data segment.
%2003 A stack expansion necessary to satisfy the request could not be done
because the stack was frozen or the stack is already at its maximum size
(stack expansion is usually not necessary to get an extra data segment).
%2004 There is not enough room in the job definition table to make an entry for
the extra data segment.
Related Information
Manuals Introduction to MPE XL for MPE V Programmers