Ada Reference Manual (Ada 2022)
D.4.1 Admission Policies
This subclause specifies a mechanism for a user to choose an admission policy. It also defines one such policy. Other policies are implementation defined.
Syntax
The form of a pragma Admission_Policy is as follows:
pragma Admission_Policy (policy_identifier);
Legality Rules
The policy_identifier shall be either FIFO_Spinning or an implementation-defined identifier.
Post-Compilation Rules
An Admission_Policy pragma is a configuration pragma.
Dynamic Semantics
An admission policy governs the order in which competing tasks are evaluated for acquiring the execution resource associated with a protected object. The admission policy is specified by an Admission_Policy pragma.
One admission policy, FIFO_Spinning, is language defined. If FIFO_Spinning is in effect, and starting a protected action on a protected object involves busy-waiting, then calls are selected for acquiring the execution resource of the protected object in the order in which the busy-wait was initiated; otherwise the FIFO_Spinning policy has no effect. If no Admission_Policy pragma applies to any of the program units in the partition, the admission policy for that partition is implementation defined.
Implementation Permissions
Implementations are allowed to define other admission policies, but are not required to support specifying more than one admission policy per partition.