Initialization overview
The program model describes three major constructs of a program
structure. The constructs are:
- Process
- A collection of resources (code and data)
- Enclave
- A collection of program units consisting of exactly one main and zero or more subroutines
- Thread
- The basic unit of execution and owner of an exception handler, a stack, and the machine state
Initialization provides for the construction of the entities described
in this model. Brief descriptions of process, enclave, and thread
initialization follow.
- Process Initialization
- Process initialization sets up the framework to manage the enclave. It is during process initialization that the library anchor area (LAA) is obtained and initialized. For more information, see Common interfaces and conventions for AMODE 64 applications.
- Enclave Initialization
- Enclave initialization creates the framework to manage enclave-related resources and the threads that run within the enclave.
- Thread Initialization
- Thread initialization consists of the acquisition of a stack and the enablement of the condition manager for the thread.
The first user routine to gain control within the enclave is the
main routine. If user parameters are passed from the host system/subsystem,
the user parameters are made available to the main routine. By the
time the main routine receives control, the following resources are
available:
- Stack storage
- Heap storage
- Condition handling
- Message services
- Math library