Memory object user tokens

Language Environment® uses the IARV64 USERTKN keyword to identify all memory objects that it allocates on behalf of an AMODE 64 application. This token is used to refer to the memory objects as a set; for example, when fork() is called to create a process, or when cleaning up above the bar resources at termination. The token is a double word (8 bytes). In the high half of the double word, Language Environment places the address of the Library Anchor Area (LAA) of the Initial Process Thread (IPT). The low half of the token varies depending on the environment:
Applications that obtain their own above the bar storage can use this user token to associate their memory objects with those of Language Environment. Depending on the actual token value used, such an association allows:
Note: To use this format of user token, IARV64 requires that the caller be authorized.

When building a user token, applications can locate the address of the LAA of the IPT by first locating the address of the LAA for the current pthread, pointed to by field PSALAA in the system prefix save area (IHAPSA). Within this LAA that is mapped by macro CEELAA, field CEELAA_IPTLAA contains the address of the LAA of the IPT for the current process. When building the user token, if the code might not always be executed when a valid AMODE 64 Language Environment exists, the code must first check whether the flag CEELAA_LeActive in the LAA is on. This ensures that field CEELAA_IPTLAA is valid.