HPlogo MPE/iX Intrinsics Reference Manual > Chapter 6 Command Definitions (FLUSHLOG-GETUSERMODE)

FREEDSEG

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable.

Releases an extra data segment assigned it by the GETDSEG intrinsic. Data segment management (DS) capability is required.


NOTE: Data segment management (DS) intrinsics are not recommended for use in the native mode programming environment. Use of DS intrinsics in NM will degrade your program's performance.

Syntax



            U16V   U16V
  FREEDSEG (index, id);

Parameters


index

16-bit unsigned integer by value (required)

Passes the index assigned to the data segment, obtained from a GETDSEG intrinsic call.

id

16-bit unsigned integer by value (required)

Passes the identification assigned to the segment. Enter zero if none is assigned.

Operation Notes


If this is a private data segment or a shareable (nonprivate) segment not currently assigned to any other process in the job/session, the segment is deleted from the entire job/session. If it is a shareable segment that is currently assigned to another process, it is deleted from the calling process but continues to exist in the job/session.

If the process is running in privileged mode when the extra data segment is acquired, then the process must be in privileged mode when it invokes FREEDSEG.

Condition Codes


CCE (2)Request granted. The data segment is deleted from the job/session.
CCG (0)Request granted. The data segment is deleted from the calling process but continues to exist in the job/session; it is being shared by another process.
CCL (1)Request denied. Either the index is invalid, or index and id do not specify the same shared data segment.

Related Information


Intrinsics ALTDSEG, DMOVIN, DMOVOUT, GETDSEG, SWITCHDB
Manuals Introduction to MPE XL for MPE V Programmers




FREADSEEK


FREELOCRIN