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

Differences between 1.1 and version 1.2
Log of other versions for file ai05s/ai05-0170-1.txt

--- ai05s/ai05-0170-1.txt	2009/10/23 03:41:05	1.1
+++ ai05s/ai05-0170-1.txt	2010/02/20 04:13:46	1.2
@@ -1,4 +1,4 @@
-!standard  D.14(29/2)                                09-10-22    AI05-0170-1/01
+!standard  D.14(29/2)                                10-02-18    AI05-0170-1/02
 !standard  D.14.1(28/2)
 !class Amendment 09-10-22
 !status work item 09-10-22
@@ -36,9 +36,9 @@
 generated. This is done under the assumption that the effect of
 interrupt handlers on the execution time clocks is negligible since
 the interrupt handlers are usually very sort pieces of code. However,
-in real-time systems that do an intensive use of interrupts this
+in real-time systems that undertake an intensive use of interrupts this
 assumption may not be realistic. For example, Ada 2005 has introduced
-timed events that can execute handlers in interrupt context.  The
+timed events that can execute handlers in interrupt context. The
 facility is convenient and has low overheads, and therefore
 programmers are tempted to putting more code into these handlers.
 
@@ -95,8 +95,8 @@
 
         with Ada.Interrupts;
         package Ada.Execution_Time.Interrupts is
-           function Clock 
-               (I : Ada.Interrupts.Interrupt_ID) 
+           function Clock
+               (I : Ada.Interrupts.Interrupt_ID)
                 return CPU_Time;
         private
             . . .
@@ -112,7 +112,7 @@
 ---------------------------------------
 
 Add the following implementation advice in RM D.14.1, "Execution Time
-Timers": 
+Timers":
 
    If the execution time consumed by interrupt handlers is accounted
    for separately from the execution time of application tasks, and if
@@ -125,7 +125,7 @@
         package Ada.Execution_Time.Timers.Interrupts is
            type Timer ( I : Ada.Interrupts.Interrupt_ID)
               is new Ada.Execution_Time.Timers.Timer
-                 (Ada.Task_Identification.Null_Task_Id'Access ) 
+                 (Ada.Task_Identification.Null_Task_Id'Access )
                  with private;
         private
            . . .
@@ -164,8 +164,31 @@
 
 !wording
 
-** TBD **
+Covering the first two points above only.
 
+Add after D.14(29/2)(Implementation Advice):
+
+When appropriate, the execution time consumed by interrupt handlers
+and run-time services on behalf of the system should not be charged
+to the execution time of tasks.
+
+If the execution time consumed by interrupt handlers is accounted
+for separately from the execution time of tasks, the
+time consumed should be made available by means
+of the following language-defined library-level package:
+
+with Ada.Interrupts;
+package Ada.Execution_Time.Interrupts is
+   function Clock (I : Ada.Interrupts.Interrupt_ID)
+        return CPU_Time;
+end Ada.Execution_Time.Interrupts;
+
+The Ada.Execution_Time.Interrupts package defines one
+execution-time clock for each Interrupt_ID. The Clock function
+returns the execution time spent by interrupt handlers while
+handling the interrupt specified by I.
+
+
 !discussion
 
 This document contains a proposal to add to the Ada standard
@@ -197,13 +220,13 @@
 In [1] and [2] the overheads incurred by the implementation of these
 new services have been measured, and found that they are very low in
 comparison with the execution times of common interrupt
-handlers. 
+handlers.
 
 Regarding the proposed API, it would be possible to define a Task_Id
 for pseudo tasks representing interrupt handlers, but this would
 create conflicts because they are not normal Ada tasks. Services
 such as Set_Priority would need to treat them as a special case,
-adding the need for new checks in potentially many places. 
+adding the need for new checks in potentially many places.
 
 We believe that using Interrupt_ID for identifying the execution time
 clocks is compatible with the proposed approach for attaching

Questions? Ask the ACAA Technical Agent