CVS difference for ai05s/ai05-0171-1.txt

Differences between 1.4 and version 1.5
Log of other versions for file ai05s/ai05-0171-1.txt

--- ai05s/ai05-0171-1.txt	2010/06/13 01:45:07	1.4
+++ ai05s/ai05-0171-1.txt	2010/08/13 01:02:19	1.5
@@ -1,6 +1,8 @@
-!standard  D.13.1(4/2)                             10-06-04    AI05-0171-1/04
+!standard  D.13.1(4/2)                             10-08-12    AI05-0171-1/05
 !standard  D.16
 !class Amendment 09-10-22
+!status Amendment 2012 10-08-12
+!status ARG Approved  8-0-2  10-06-18
 !status work item 09-10-22
 !status received 09-10-22
 !priority Medium
@@ -51,6 +53,24 @@
 This clause allows implementations on multiprocessor platforms to
 be configured.
 
+Static Semantics
+
+The following language-defined library package exists:
+
+   package System.Multiprocessors is
+      pragma Preelaborate(Multiprocessors);
+
+      type CPU_Range is range 0 .. <implementation-defined>;
+      Not_A_Specific_CPU : constant CPU_Range := 0;
+      subtype CPU is CPU_Range range 1 .. CPU_Range'last;
+
+      function Number_Of_CPUs return CPU;
+   end System.Multiprocessors;
+
+A call of Number_Of_CPUs returns the number of processors available
+to the program. Within a given partition, each call on Number_Of_CPUs
+will return the same value.
+
 Syntax
 
 The form of a pragma CPU is as follows:
@@ -62,6 +82,8 @@
 
 The expected type for the expression is System.Multiprocessors.CPU_Range.
 
+Legality Rules
+
 A CPU pragma is allowed only immediately within a task_definition, or the
 declarative_part of a subprogram_body. At most one such pragma shall appear
 within a given construct.
@@ -69,25 +91,21 @@
 For a CPU pragma that appears in the declarative_part of a subprogram_body,
 the expression shall be static.
 
-
-Static Semantics
-
-The following language-defined library package exists:
-
-   package System.Multiprocessors is
-      pragma Preelaborate(Multiprocessors);
-      type CPU_Range is range 0 .. <implementation-defined>;
-      Not_A_Specific_CPU : constant CPU_Range := 0;
-      subtype CPU is CPU_Range range 1 .. CPU_Range'last;
-      function Number_Of_CPUs return CPU;
-   end System.Multiprocessors;
-
-
 Dynamic Semantics
 
-A CPU pragma has no effect if it occurs in the declarative part of the
-subprogram_body of a subprogram other than the main subprogram.
+The expression of a CPU pragma that appears in a task_definition is
+evaluated for each task object (see 9.1). The CPU value is then associated
+with the task object whose task_definition contains the pragma.
+
+Elaboration of a CPU pragma given immediately within the declarative_part of a
+subprogram_body has no effect; the CPU value is not associated with any
+task unless the pragma occurs within the main subprogram.
 
+The CPU value is associated with the environment task if the pragma
+appears in the declarative_part of the main subprogram.
+If a pragma CPU does not apply to the main subprogram it is implementation
+defined on which processor the environment task executes.
+
 The CPU value determines the processor on which the task will
 activate and execute; the task is said to be assigned to
 that processor. If the CPU value is Not_A_Specific_CPU
@@ -97,28 +115,16 @@
 a processor. If the CPU value is not in the range of
 System.Multiprocessors.CPU_Range or is greater than Number_Of_CPUs
 the task is defined to have failed, and it becomes a completed task (see
-9.2(1)).
-
-The CPU value is associated with the environment task if the pragma
-appears in the declarative_part of the main subprogram. If a pragma
-CPU does not apply to the main subprogram it is implementation defined
-where the environment task executes.
-
-A call of Number_Of_CPUs returns the number of processors available
-to the program. Within a given partition, each call on Number_Of_CPUs
-will return the same value.
+9.2).
 
 ---
 
-
 Add to D.13.1(4/2) a new restriction:
 
-No_Dependence => System.Multiprocessors.Dispatching_Domains;
+No_Dependence => System.Multiprocessors.Dispatching_Domains,
 
-[Should there be a new restrictions_parameter Max_Dispatching_Domains
-set to 1 for Ravenscar]
-
 ---
+
 Add after D.13.1(4/2):
 
 Implementation Requirements
@@ -160,9 +166,152 @@
 
    Alan : Worker(1);
 
+
+!corrigendum D.13.1(4/2)
+
+@drepl
+@xcode<@b<pragma> Task_Dispatching_Policy (FIFO_Within_Priorities);
+@b<pragma> Locking_Policy (Ceiling_Locking);
+@b<pragma> Detect_Blocking;
+@b<pragma> Restrictions (
+                No_Abort_Statements,
+                No_Dynamic_Attachment,
+                No_Dynamic_Priorities,
+                No_Implicit_Heap_Allocations,
+                No_Local_Protected_Objects,
+                No_Local_Timing_Events,
+                No_Protected_Type_Allocators,
+                No_Relative_Delay,
+                No_Requeue_Statements,
+                No_Select_Statements,
+                No_Specific_Termination_Handlers,
+                No_Task_Allocators,
+                No_Task_Hierarchy,
+                No_Task_Termination,
+                Simple_Barriers,
+                Max_Entry_Queue_Length =@> 1,
+                Max_Protected_Entries =@> 1,
+                Max_Task_Entries =@> 0,
+                No_Dependence =@> Ada.Asynchronous_Task_Control,
+                No_Dependence =@> Ada.Calendar,
+                No_Dependence =@> Ada.Execution_Time.Group_Budget,
+                No_Dependence =@> Ada.Execution_Time.Timers,
+                No_Dependence =@> Ada.Task_Attributes);>
+@dby
+@xcode<@b<pragma> Task_Dispatching_Policy (FIFO_Within_Priorities);
+@b<pragma> Locking_Policy (Ceiling_Locking);
+@b<pragma> Detect_Blocking;
+@b<pragma> Restrictions (
+                No_Abort_Statements,
+                No_Dynamic_Attachment,
+                No_Dynamic_Priorities,
+                No_Implicit_Heap_Allocations,
+                No_Local_Protected_Objects,
+                No_Local_Timing_Events,
+                No_Protected_Type_Allocators,
+                No_Relative_Delay,
+                No_Requeue_Statements,
+                No_Select_Statements,
+                No_Specific_Termination_Handlers,
+                No_Task_Allocators,
+                No_Task_Hierarchy,
+                No_Task_Termination,
+                Simple_Barriers,
+                Max_Entry_Queue_Length =@> 1,
+                Max_Protected_Entries =@> 1,
+                Max_Task_Entries =@> 0,
+                No_Dependence =@> Ada.Asynchronous_Task_Control,
+                No_Dependence =@> Ada.Calendar,
+                No_Dependence =@> Ada.Execution_Time.Group_Budget,
+                No_Dependence =@> Ada.Execution_Time.Timers,
+                No_Dependence =@> Ada.Task_Attributes,
+                No_Dependence =@> System.Multiprocessors.Dispatching_Domains);>
+
+@s8<@i<Implementation Requirements>>
+
+A task shall only be on the ready queues of one processor, and the
+processor to which a task belongs shall be defined statically.
+Whenever a task running on a processor reaches a task dispatching point,
+it goes back to the ready queues of the same processor. A task with
+a CPU value of Not_A_Specific_CPU will execute on an implementation
+defined processor. A task without a CPU pragma will activate and execute
+on the same processor as its activating task.
+
+@s8<@i<Implementation Advice>>
+
+On a multiprocessor system, an implementation should support a fully
+partitioned approach. Each processor should have separate and disjoint
+ready queues.
+
+!corrigendum D.16(0)
+
+@dinsc
+
+This clause allows implementations on multiprocessor platforms to
+be configured.
+
+@s8<@i<Static Semantics>>
+
+The following language-defined library package exists:
+
+@xcode<@b<package> System.Multiprocessors @b<is>
+   @b<pragma> Preelaborate(Multiprocessors);
+
+   @b<type> CPU_Range @b<is range> 0 .. @ft<@i<implementation-defined>>;
+   Not_A_Specific_CPU : @b<constant> CPU_Range := 0;
+   @b<subtype> CPU @b<is> CPU_Range @b<range> 1 .. CPU_Range'last;
+
+   @b<function> Number_Of_CPUs @b<return> CPU;
+@b<end> System.Multiprocessors;>
+
+A call of Number_Of_CPUs returns the number of processors available
+to the program. Within a given partition, each call on Number_Of_CPUs
+will return the same value.
+
+@s8<@i<Syntax>>
+
+The form of a @fa<pragma> CPU is as follows:
+
+@xcode<   @ft<@b<pragma> CPU (@fa<expression>);>>
+
+@s8<@i<Name Resolution Rules>>
+
+The expected type for the @fa<expression> is System.Multiprocessors.CPU_Range.
+
+@s8<@i<Legality Rules>>
+
+A CPU pragma is allowed only immediately within a @fa<task_definition>, or the
+@fa<declarative_part> of a @fa<subprogram_body>. At most one such pragma shall appear
+within a given construct.
+
+For a CPU pragma that appears in the @fa<declarative_part> of a @fa<subprogram_body>,
+the @fa<expression> shall be static.
 
---!corrigendum D.13.1(4/2)
+@s8<@i<Dynamic Semantics>>
 
+The @fa<expression> of a CPU pragma that appears in a @fa<task_definition> is
+evaluated for each task object (see 9.1). The CPU value is then associated
+with the task object whose @fa<task_definition> contains the pragma.
+
+Elaboration of a CPU pragma given immediately within the @fa<declarative_part> of a
+@fa<subprogram_body> has no effect; the CPU value is not associated with any
+task unless the pragma occurs within the main subprogram.
+
+The CPU value is associated with the environment task if the pragma
+appears in the @fa<declarative_part> of the main subprogram.
+If a pragma CPU does not apply to the main subprogram it is implementation
+defined on which processor the environment task executes.
+
+The CPU value determines the processor on which the task will
+activate and execute; the task is said to be assigned to
+that processor. If the CPU value is Not_A_Specific_CPU
+then the task is not assigned to a processor.
+A task without a CPU pragma will activate and execute on the same
+processor as its activating task if the activating task is assigned
+a processor. If the CPU value is not in the range of
+System.Multiprocessors.CPU_Range or is greater than Number_Of_CPUs
+the task is defined to have failed, and it becomes a completed task (see
+9.2).
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent