The full range of priority values supported by an
implementation is specified by the subtype Any_Priority. The subrange
of priority values that are high enough to require the blocking of one
or more interrupts is specified by the subtype Interrupt_Priority. [The
subrange of priority values below System.Interrupt_Priority'First is
specified by the subtype System.Priority.]

Dynamic Semantics

A
task priority is an integer value that indicates a degree of urgency
and is the basis for resolving competing demands of tasks for resources.
Unless otherwise specified, whenever tasks compete for processors or
other implementation-defined resources, the resources are allocated to
the task with the highest priority value. The base priority of
a task is the priority with which it was created, or to which it was
later set by Dynamic_Priorities.Set_Priority (see D.5).
At all times, a task also has an active priority, which generally
reflects its base priority as well as any priority it inherits from other
sources. Priority inheritance is the process by which the priority
of a task or other entity (e.g. a protected object; see D.3)
is used in the evaluation of another task's active priority.

{AI05-0229-1}
{AI12-0081-1}
The expression
specified for the Priority or Interrupt_Priority aspect of a task type is evaluated for each time
an task object of the task type is created (see 9.1).
For the Priority aspect, the value of the expression
is converted to the subtype Priority; for the Interrupt_Priority aspect,
this value is converted to the subtype Any_Priority. The priority value
is then associated with the task objectwhose task
declaration specifies the aspect.

{AI05-0229-1}
The initial value of a task's base priority is specified by default or
by means of a Priority or Interrupt_Priority aspect. [After a task is
created, its base priority can be changed only by a call to Dynamic_Priorities.Set_Priority
(see D.5).] The initial base priority of a
task in the absence of an aspect is the base priority of the task that
creates it at the time of creation (see 9.1).
If the aspect Priority is not specified for the main subprogram, the
initial base priority of the environment task is System.Default_Priority.
[The task's active priority is used when the task competes for processors.
Similarly, the task's active priority is used to determine the task's
position in any queue when Priority_Queuing is specified (see D.4).]

{AI95-00357-01}
At any time, the active priority of a task is the maximum of all the
priorities the task is inheriting at that instant. For a task that is
not held (see D.11), its base priority is
a source of priority inheritance unless otherwise specified for a particular
task dispatching policy. Other sources of priority inheritance are specified
under the following conditions:

5 It is a consequence of the active priority
rules that at the point when a task stops inheriting a priority from
another source, its active priority is re-evaluated. This is in addition
to other instances described in this Annex for such re-evaluation.

Wording Changes from Ada 83

Wording Changes from Ada 95

{8652/0072}
{AI95-00092-01}
Corrigendum: Clarified that dynamic priority changes are not transitive
- that is, they don't apply to tasks that are being activated by or in
rendezvous with the task that had its priority changed.