Spec-Zone.ru › Ada 2022
Ada Reference Manual (Ada 2022)

J.15.9 Pragma CPU

Syntax

The form of a pragma CPU is as follows:
pragma CPU (expression);

Name Resolution Rules

The expected type for the expression of a pragma CPU is System.Multiprocessors.CPU_Range.

Legality Rules

A CPU pragma is allowed only immediately within a task_definition, protected_definition, or the declarative_part of a subprogram_body.
For a CPU pragma that appears in the declarative_part of a subprogram_body, the expression shall be static.

Static Semantics

For an implementation that supports Annex D, a pragma CPU specifies the value of the CPU aspect (see D.16). 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. 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. Otherwise, the expression is associated with the aspect for the subprogram that contains the pragma.


Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API