Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
 
Annotated Ada Reference Manual (Ada 202x Draft 26)Legal Information
Contents   Index   References   Search   Previous   Next 

J.15.11 Pragmas Priority and Interrupt_Priority

Syntax

1/3
{AI05-0229-1} The form of a pragma Priority is as follows: 
2/3
  pragma Priority (expression);
3/3
{AI05-0229-1} The form of a pragma Interrupt_Priority is as follows: 
4/3
  pragma Interrupt_Priority [(expression);]

Name Resolution Rules

5/3
{AI05-0229-1} The expected type for the expression in a Priority or Interrupt_Priority pragma is Integer.

Legality Rules

6/3
{AI05-0229-1} A Priority pragma is allowed only immediately within a task_definition, a protected_definition, or the declarative_part of a subprogram_body. An Interrupt_Priority pragma is allowed only immediately within a task_definition or a protected_definition.
7/3
{AI05-0229-1} For a Priority pragma that appears in the declarative_part of a subprogram_body, the expression shall be static, and its value shall be in the range of System.Priority.

Static Semantics

8/3
{AI05-0229-1} For an implementation that supports Annex D, a pragma Priority specifies the value of the Priority aspect (see D.1) and a pragma Interrupt_Priority specifies the value of the Interrupt_Priority aspect as follows:
9/3
If the pragma appears in a task_definition, the expression is associated with the aspect for the task type or single_task_declaration that contains the pragma;
10/3
If the pragma appears in a protected_definition, the expression is associated with the aspect for the protected type or single_protected_declaration that contains the pragma;
11/3
If the pragma appears in the declarative_part of a subprogram_body, the expression is associated with the aspect for the subprogram that contains the pragma.
12/3
{AI05-0229-1} If there is no expression in an Interrupt_Priority pragma, the Interrupt_Priority aspect has the value Interrupt_Priority'Last. 

Wording Changes from Ada 2005

12.a/3
{AI05-0229-1} {AI05-0299-1} This subclause is new. Pragmas Interrupt_Priority and Priority were moved here from D.1; aspects Interrupt_Priority and Priority live there now. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe