CVS difference for ais/ai-00297.txt

Differences between 1.5 and version 1.6
Log of other versions for file ais/ai-00297.txt

--- ais/ai-00297.txt	2003/01/16 01:37:01	1.5
+++ ais/ai-00297.txt	2003/02/19 02:19:51	1.6
@@ -1,4 +1,4 @@
-!standard D.8 (00)                                     03-01-07  AI95-00297/03
+!standard D.8 (00)                                     03-02-10  AI95-00297/04
 !class amendment 02-06-01
 !status work item 02-06-01
 !status received 02-06-01
@@ -104,8 +104,8 @@
 D.15 Timing Events
 
 This clause introduces a language-defined child package of Ada.Real_Time
-to allow user-defined procedures to be executed at a specified time without
-the need to use a task or a delay statement.
+to allow user-defined protected procedures to be executed at a specified
+time without the need to use a task or a delay statement.
 
 Static Symantics
 
@@ -114,63 +114,86 @@
 package Ada.Real_Time.Timing_Events is
   type Timing_Event is limited private;
   type Timing_Event_Handler
-       is access protected procedure(TE : in out Timing_Event);
-  procedure Set_Handler(TE : in out Timing_Event; At_Time : in Time;
+       is access protected procedure(Event : in out Timing_Event);
+  procedure Set_Handler(Event : in out Timing_Event; At_Time : in Time;
             Handler: in Timing_Event_Handler);
-  procedure Set_Handler(TE : in out Timing_Event; In_Time: in Time_Span;
+  procedure Set_Handler(Event : in out Timing_Event; In_Time: in Time_Span;
             Handler: in Timing_Event_Handler);
-  function Is_Handler_Set(TE : Timing_Event) return Boolean;
-  function Current_Handler(TE : Timing_Event) return Timing_Event_Handler;
-  procedure Cancel_Handler(TE : in out Timing_Event;
+  function Is_Handler_Set(Event : Timing_Event) return Boolean;
+  function Current_Handler(Event : Timing_Event) return Timing_Event_Handler;
+  procedure Cancel_Handler(Event : in out Timing_Event;
             Cancelled : out Boolean);
-  function Time_Of_Event(TE : Timing_Event) return Time;
-  pragma No_Deeper_Objects(Timing_Event);
+  function Time_Of_Event(Event : Timing_Event) return Time;
 private
   ... -- not specified by the language
 end Ada.Real_Time.Timing_Events;
 
-A call to a Set_Handler procedure returns when the timing event is set.
+An object of type Timing_Event is said to be set if it has a
+linked Timing_Event_Handler. An object is said to be cleared
+if it has no linked Timing_Event_Handler. All Timing_Event objects
+are initially cleared.
 
-A call of either Set_Handler procedure is not a potentially suspending
-operation and hence can be called from within a Timing_Event_Handler.
+A call to a Set_Handler procedure returns when the timing event is set.
 
 Dynamic Semantics
 
-At a time no earlier than that implied by the time parameter, the
-Timing_Event_Handler procedure is executed. The rules governing timing
-accuracy are the same as in D.9.
+A call of either Set_Handler procedure is not a potentially suspending
+operation and hence can be called from within a Timing_Event_Handler.
 
-It is a bounded error to use a protected procedure for the
-Timing_Event_Handler with a priority less than Interrupt_Priority'last.
+Following a call of a Set_Handler procedure, at a time no earlier than
+that implied by the time parameter, the Timing_Event_Handler procedure
+is executed. The rules governing timing accuracy are the same as in D.9.
+The Timing_Event_Handler is only executed if the timing event is set
+at the time of execution. Following the execution of the Timing_Event_Handler
+the Timing_Event is cleared.
+
+When a Set_Handler procedure is called a check is made that the
+ceiling priority of Timing_Event_Handler is Interrupt_Priority'last.
+If the check fails, Program_Error is raised.
 
 If a Set_Handler procedure is called with zero or negative In_Time or with
-At_time indicating a time in the past then the Timing_Event_Handler is
+At_time indicating a time in the past then Timing_Event_Handler is
 executed immediately by the task executing the Set_Handler call.
+Event is cleared.
 
-An exception raised during the execution of a Timing_Event_Handler is ignored
-(see C.3, "Interrupt Support").
+An exception propagated from a Timing_Event_Handler invoked by
+a timing event has no effect.
 
-A call to a Set_Handler procedure for a timing event that is already set will
-override the first set operation.
+A call to a Set_Handler procedure for a Timing_Event that is already
+set will override the first set operation. Event remains set.
+
+A call to Is_Handler_Set returns True if Event is set;
+otherwise it returns False.
 
-A call to Is_Handler_Set returns false if the timing event is not set;
-otherwise it return True.
+A call to Cancel_Handler returns after the Event is cleared.
+Cancelled is set to True if Event was set prior to the call;
+otherwise the parameter is set to False and the call has no effect.
 
-A call to Cancel_Handler returns with Cancelled set to True if the
-event was set prior to it been cancelled; otherwise the parameter is
-set to False and the call has no effect.
+A call to Current_Handler returns with the current Timing_Event_Handler.
+If Event is not set Current_Handler returns null.
 
-A call to Current_Handler for a timing event that is not set will
-return null. A call to Time_Of_Event for a timing event that is not
-set will return Ada.Real_Time.Time_First.
+A call to Time_Of_Event returns with the time of Event.
+If Event is not set, Time_Of_Event returns Ada.Real_Time.Time_First.
 
-A number of timing events registered for the same time execute in FIFO
-order.
+As the final step of finalization of a Timing_Event, the Timing_Event
+is cleared.
 
+If a number of timing events are set for the same time, execution
+is in FIFO order.
+
 Implementation Advice
 
 The protected handler procedure should be executed directly by the
 real-time clock interrupt mechanism.
+
+
+Add to D.7 a new restriction identifier
+
+No_Local_Timing_Events
+	Timing_Events shall be declared only at library level.
+
+Add this restriction to Ravenscar definition (D.13).
+
 
 !discussion
 

Questions? Ask the ACAA Technical Agent