MPE/iX Intrinsics Reference Manual (32650-90875)
Chapter 6 297
Command Definitions (FLUSHLOG-GETUSERMODE)
GETDSEG
GETDSEG
NM and CM callable.
Creates or acquires an extra data segment for use by the process. Data segment
management (DS) capability is required.
NOTE
Data segment management (DS) intrinsics are not recommended for use in
native mode programming environment. Use of DS intrinsics in NM degrades
your program's performance.
Syntax
U16 I16 U16V
GETDSEG(
index,length,id
);
Parameters
index
16-bit unsigned integer by reference (required)
Returns the index of the extra data segment assigned by the operating
system. When GETDSEG is called in user mode,
index
is a logical index of
the assigned data segment; if an error is found,
index
is set to
%2000-%2004. When GETDSEG is called in privileged mode,
index
is the
actual data segment table (DST) entry number assigned for the data
segment.
length
16-bit signed integer by reference (required)
Passes the user-specified maximum size, in half words, of the newly
created data segment. If the data segment already exists,
length
returns
the maximum size, in half words, of the data segment.
id
16-bit unsigned integer by value (required)
Passes the identity that declares the extra data segment shareable
between other processes in the job/session, or private to the calling
process. For a shareable extra data segment, specify
id
as a nonzero value.
If an extra data segment with the same identification already exists, it is
made available to the calling process; otherwise, a new extra data
segment, shareable within the job/session, is created with
id
. For a private
extra data segment, specify an
id
of zero.
Operation Notes
The number of extra data segments that can be requested, and the maximum size allowed
these segments, is limited by parameters specified when the system is configured. When
an extra data segment is created, the GETDSEG intrinsic returns a logical index number to
the process. This index number is assigned by the operating system and allows the process