H.6 Pragma Partition_Elaboration_Policy
This Reference Manual output has not been verified, and may contain omissions or errors. Report any problems on the tracking issue
This subclause defines a
pragma for user control over elaboration policy.
The form of a
pragma Partition_Elaboration_Policy is as follows:
pragma Partition_Elaboration_Policy (policy_
identifier shall be either Sequential, Concurrent or an implementation-defined identifier.
pragma Partition_Elaboration_Policy is a configuration pragma. It specifies the elaboration policy for a partition. At most one elaboration policy shall be specified for a partition.
If the Sequential policy is specified for a partition, then pragma Restrictions (No_Task_Hierarchy) shall also be specified for the partition.
Notwithstanding what this document says elsewhere, this
pragma allows partition elaboration rules concerning task activation and interrupt attachment to be changed. If the policy_
identifier is Concurrent, or if there is no pragma Partition_Elaboration_Policy defined for the partition, then the rules defined elsewhere in this Reference Manual apply.
If the partition elaboration policy is Sequential, then task activation and interrupt attachment are performed in the following sequence of steps:
- The activation of all library-level tasks and the attachment of interrupt handlers are deferred until all library units are elaborated.
- The interrupt handlers are attached by the environment task.
- The environment task is suspended while the library-level tasks are activated.
- The environment task executes the main subprogram (if any) concurrently with these executing tasks.
If several dynamic interrupt handler attachments for the same interrupt are deferred, then the most recent call of Attach_Handler or Exchange_Handler determines which handler is attached.
If any deferred task activation fails, Tasking_Error is raised at the beginning of the sequence of statements of the body of the environment task prior to calling the main subprogram.
If the partition elaboration policy is Sequential and the Environment task becomes permanently blocked during elaboration, then the partition is deadlocked and it is recommended that the partition be immediately terminated.
If the partition elaboration policy is Sequential and any task activation fails, then an implementation may immediately terminate the active partition to mitigate the hazard posed by continuing to execute with a subset of the tasks being active.