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

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

--- ai05s/ai05-0117-1.txt	2010/06/13 01:30:12	1.4
+++ ai05s/ai05-0117-1.txt	2010/10/19 03:05:44	1.5
@@ -1,4 +1,4 @@
-!standard  C.6(23)                                   10-06-04    AI05-0117-1/01
+!standard  C.6(16)                                   10-10-18    AI05-0117-1/02
 !class Amendment 08-10-16
 !status work item 08-10-16
 !status received 08-07-29
@@ -8,8 +8,9 @@
 
 !summary
 
-A new pragma is defined that controls the ordering of access to
-shared variables.
+Pragma Volatile has its implementation advice changed to
+ensure that it supports the required efficient serialisation
+on multiprocessor platforms.
 
 !problem
 
@@ -22,72 +23,43 @@
 
 !proposal
 
-Add a new representation pragma that controls the ordering of access to
-shared variables. The new control would be similar to pragma Volatile
-without the need to perform read and updates on the object directly
-to memory.
+Weaken the definition of Volatile so that it provides the required
+ordering but does not require all read/writes to be performed to actual
+memory locations.
 
 !wording
 
-Add a new clause:
+Delete C.6 (16)
 
-D.16.3 Shared Variable Control for Multiprocessor Implementation
+Delete Implementation Note C.6(16.a).
 
-This clause specifies a representation pragma that controls the use of
-shared variables on multiprocessors.
+Add a new Implementation Note to AARM (or Implementation
+Advice to LRM):
 
-Syntax
+On a multiprocessor, any read or update of a volatile object should involve
+the use of an appropriate memory barrier to ensure that all tasks
+on all processors see the same order of updates to volatile variables.
 
-The form of a pragma CPU is as follows:
-
-pragma Coherent(local_name);
-
-A coherent type is one to which a pragma coherent applies. A coherent
-object is one to which a pragma coherent applies.
-
-Name Resolution Rules
-The local_name shall resolve to denote either an object_declaration, a
-non-inherited component_declaration, or a full_type_declaration.
-
-Legality Rules
-If a coherent object is passed as a parameter ... [C.6(12)]
-
-Static Semantics
-The pragma is a representation pragma (see 13.1).
-
-Dynamic Semantics
-Two actions are sequential (see 9.10) if each is the read or update
-of the same coherent object.
-
-[C.6(18-19)]
-
-Implementation Requirement
-The external effect of a program (see 1.1.3) is defined to include each read and
-update of a coherent object. Reads and updates of two different coherent
-objects in the same task are in the order specified by the program.
-
---
-
-Add to 9.10(15) Coherent and see D.16.3.
-
---
-Add after (or as part of) 1.1.3(13):
+!discussion
 
-Any read or update of a coherent object (see D.16.3);
+After considering a new pragma (Coherent) it was decided to modify
+the current definition of pragma Volatile to remove the requirement that
+caches etc cannot be used with volatile variables. This brings the Ada
+definition of volatile closer to that used in other languages.
 
-!discussion
+Paragraph C.6(16) is removed as 1.1.3 (13) already makes it clear
+that any read or update of a volatile object has an external effect.
 
-See appendix
 
 !example
 
 The following will ensure that task 2 does get the value 42.
 
 Data : Integer;
-pragma Coherent (Data);
+pragma Volatile (Data);
 
 Flag : Boolean := False;
-pragma Coherent (Flag);
+pragma Volatile (Flag);
 
 
 in task 1:

Questions? Ask the ACAA Technical Agent