CVS difference for ais/ai-00327.txt

Differences between 1.8 and version 1.9
Log of other versions for file ais/ai-00327.txt

--- ais/ai-00327.txt	2003/12/07 05:00:33	1.8
+++ ais/ai-00327.txt	2004/02/21 03:06:13	1.9
@@ -1,4 +1,4 @@
-!standard D.03 (00)                                    03-11-24  AI95-00327/04
+!standard D.03 (00)                                    04-02-19  AI95-00327/05
 !class amendment 03-06-05
 !status work item 03-06-05
 !status received 03-06-05
@@ -22,7 +22,7 @@
 
 !problem
 
-In Ada, the ceiling priority of a PO is static and thus it can only be set
+In Ada, the ceiling priority of a PO is constant and thus it can only be set
 once, by means of pragma Priority, at PO creation time. In contrast, task
 priorities may be set dynamically. The ability to dynamically change protected
 object ceiling priorities is especially required in situations where dynamic
@@ -48,6 +48,33 @@
 
 !wording
 
+Add a new paragraph after D.3(13)
+
+Bounded (Run-Time) Errors
+
+Following any change of priority, it is a bounded error for the active
+priority of any task with a call queued on an entry of a protected
+object to be higher than the ceiling priority of the protected object.
+In this case one of the following applies:
+
+  - at any time prior to executing the entry body Program_Error is raised
+    in the calling task;
+
+  - when the entry is open the entry body is executed at the ceiling
+    priority of the protected object;
+
+  - when the entry is open the entry body is executed at the ceiling
+    priority of the protected object and then Program_Error is raised in
+    the calling task;
+
+  - when the entry is open the entry body is executed at the ceiling
+    priority of the protected object that was in effect when the
+    entry call was queued.
+
+
+Delete paragraph D.5(11).
+
+
 Add a new section:
 
 D.5.1 Dynamic Priorities for Protected Objects
@@ -55,59 +82,46 @@
 This clause specifies how the priority of a protected object can be
 modified or queried at run time.
 
-Dynamic Semantics
+Static Semantics
 
 The following attribute of a protected object is defined:
 
 P'Priority:
-Yields a variable component of the enclosing protected
-object P (or current instance of the enclosing protected type P) of
-type System.Any_Priority, which denotes the priority of P. Use of
-this attribute is allowed only inside a protected body of P.
-
-The attribute is part of the current instance of the protected object;
-it is thus defined to be a constant within the body of a protected function,
-but a variable within the body of a protected procedure and an entry_body.
-
-When the locking policy in effect defines priorities for protected
-objects, 'Priority denotes the priority of the designated protected
-object. Otherwise, the meaning of 'Priority is implementation defined.
-
-If Locking_Policy Ceiling_Locking is specified then the ceiling priority
-of a protected object P is set to the value of P'Priority at the end
-of each protected action of P.
-
-If Locking_Policy Ceiling_Locking is specified then it is a bounded error to
-lower the priority of a protected object below the active priority of any task
-that is queued on an entry of the protected object. In this case one of the
-following applies:
+Denotes a component of the enclosing protected object P.
+This component is of type System.Any_Priority and its value is the
+priority of P. Reference to this attribute shall appear only inside
+the body of P.
 
-  - Program_Error exception is raised in the queued task;
-
-  - the entry body is executed, when the entry is open, at the ceiling
-    priority of the protected object;
+The initial value of this attribute is set by pragmas Priority or
+Interrupt_Priority, and can be changed by an assignment.
 
-  - the entry body is executed, when the entry is open, at the ceiling
-    priority of the protected object and Program_Error exception is raised in
-    the queued task;
+Dynamic Semantics
 
-  - the entry body is executed, when the entry is open, at the
-    ceiling priority of the protected object that was in effect when the
-    entry call was queued.
+If the Locking_Policy Ceiling_Locking is in effect then the ceiling priority
+of a protected object P is set to the value of P'Priority at the end
+of each protected action of P.
 
 Metrics
 
 The implementation shall document the following metric:
   The difference in execution time of calls to the following procedures
   in protected object P,
+
   protected P is
+    procedure Do_Not_Set_Ceiling (Pr : System.Any_Priority);
+    procedure Set_Ceiling (Pr : System.Any_Priority);
+  private
+    null;
+  end P;
+
+  protected body P is
     procedure Do_Not_Set_Ceiling (Pr : System.Any_Priority) is
     begin
       null;
     end;
     procedure Set_Ceiling (Pr : System.Any_Priority) is
     begin
-      P'Priority := Pr;
+      P'Priority :=Pr;
     end;
   end P;
 
@@ -122,33 +136,28 @@
 
 No_Dynamic_Priorities
   There are no semantic dependences on the package Dynamic_Priorities, and
-  occurrences of attribute 'Priority are not allowed.
-
---
-
-Change D.5(11) to reflect the words used above.
-
+  no occurrences of attribute 'Priority.
 
 !example
 
-A simple example on how to use the proposed features is given in this
+A simple example of how to use the proposed features is given in this
 section.
 
   protected type My_Protected is
     pragma Priority(Some_Initial_Value);
-    procedure Set_My_Ceiling(Pr: in System.Any_Priority);
+    procedure Set_My_Ceiling(Pr: in Any_Priority);
     -- other protected procedures, functions and/or entries
   end My_Protected;
 
   protected body My_Protected is
-    procedure Set_My_Ceiling(Pr : in System.Any_Priority) is
+    procedure Set_My_Ceiling(Pr : in Any_Priority) is
     begin
-      -- Code before setting the ceiling
+      -- Code before setting the priority
       My_Protected'Priority := Pr;
-      -- Code after setting the ceiling
+      -- Code after setting the priority
       -- The new ceiling does not take effect
       -- until the end of this procedure, but the
-      -- new value is return by any read of 'Priority
+      -- new value is returned by any read of 'Priority
     end Set_My_Ceiling;
 
     -- Rest of bodies
@@ -167,7 +176,7 @@
       (P: in System.Any_Priority);
    Ceiling_Changing_Procedure: General_Set_Ceiling;
 
-Once the access object is properly initialised, the call would take the form:
+Once the access object is properly initialized, the call would take the form:
 
    Ceiling_Changing_Procedure(P);
 

Questions? Ask the ACAA Technical Agent