CVS difference for ais/ai-00354.txt

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

--- ais/ai-00354.txt	2005/03/26 00:26:38	1.9
+++ ais/ai-00354.txt	2005/04/13 05:37:17	1.10
@@ -1,4 +1,4 @@
-!standard D.14.2 (01)                                 05-03-16  AI95-00354/07
+!standard D.14.2 (01)                                 05-03-24  AI95-00354/08
 !class amendment 03-09-27
 !status Amendment 200Y 04-06-25
 !status ARG Approved 7-0-1  04-06-13
@@ -41,25 +41,26 @@
 
 with System;
 package Ada.Execution_Time.Group_Budgets is
+
   type Group_Budget is limited private;
 
   type Group_Budget_Handler is access
        protected procedure (GB : in out Group_Budget);
 
   type Task_Array is array (Positive range <>) of
-                                  Ada.Task_Identification.Task_ID;
+                                  Ada.Task_Identification.Task_Id;
 
   Min_Handler_Ceiling : constant System.Any_Priority :=
     *implementation-defined*;
 
   procedure Add_Task (GB : in out Group_Budget;
-                      T  : in Ada.Task_Identification.Task_ID);
+                      T  : in Ada.Task_Identification.Task_Id);
   procedure Remove_Task (GB : in out Group_Budget;
-                         T  : in Ada.Task_Identification.Task_ID);
+                         T  : in Ada.Task_Identification.Task_Id);
   function Is_Member (GB : Group_Budget;
-                      T  : Ada.Task_Identification.Task_ID) return Boolean;
+                      T  : Ada.Task_Identification.Task_Id) return Boolean;
   function Is_A_Group_Member (
-      T : Ada.Task_Identification.Task_ID) return Boolean;
+      T : Ada.Task_Identification.Task_Id) return Boolean;
   function Members (GB : Group_Budget) return Task_Array;
 
   procedure Replenish (GB : in out Group_Budget; To : in Time_Span);
@@ -82,14 +83,16 @@
 of tasks. The type Group_Budget needs finalization (see 7.6). A task can belong
 to at most one group. Tasks of any priority can be added to a group.
 
-An object of type Group_Budget is said to be *set* if it is associated with a
-non-null Group_Budget_Handler and *cleared* otherwise. All Group_Budget
-objects are initially cleared. An object of type Group_Budget has an associated
-non-negative value of type Time_Span known as its *budget*.
-
-The type Group_Budget_Handler identifies a protected procedure to be executed by
-the implementation when the budget is exhausted. Such a protected procedure is
-called a *handler*.
+An object of type Group_Budget has an associated non-negative value of
+type Time_Span known as its *budget*, which is initially Time_Span_Zero.
+The type Group_Budget_Handler identifies a protected procedure to be executed
+by the implementation when the budget is *exhausted*, that is, reaches
+zero. Such a protected procedure is called a *handler*.
+
+An object of type Group_Budget also includes a handler, which is a value of
+type Group_Budget_Handler. The handler of the object is said to be *set* if it
+is not null and *cleared* otherwise. The handler of all Group_Budget objects is
+initially cleared.
 
 Dynamic Semantics
 
@@ -108,41 +111,45 @@
 member of some group; otherwise it returns False.
 
 The function Members returns an array of values of type
-Ada.Task_Identification.Task_ID identifying the members of the group GB. The
+Task_Identification.Task_Id identifying the members of the group GB. The
 order of the components of the array is unspecified.
 
 The procedure Replenish loads the group budget GB with the Time_Span value To.
 Group_Budget_Error is raised if the Time_Span value To is non-positive. Any
 execution of any member of the group of tasks results in the budget counting
-down. When the budget becomes exhausted (goes to Time_Span_Zero), the associated
-handler is executed if the group budget GB is set; the tasks continue to
-execute. An object of type Group_Budget is initially loaded with zero budget.
+down. When the budget becomes exhausted (reaches Time_Span_Zero), the
+associated handler is executed if the handler of group budget GB is set; the
+tasks continue to execute.
 
 The procedure Add modifies the budget of the group GB. A positive value for
 Interval increases the budget. A negative value for Interval reduces the budget,
 but never below Time_Span_Zero. A zero value for Interval has no effect. A call
-of procedure Add that results in the value of the budget going to Time_Span_Zero
-causes the associated handler to be executed if the group budget GB is set.
+of procedure Add that results in the value of the budget going to
+Time_Span_Zero causes the associated handler to be executed if the handler of
+the group budget GB is set.
 
 The function Budget_Has_Expired returns True if the budget of group GB is
 exhausted (equal to Time_Span_Zero); otherwise it returns False.
 
 The function Budget_Remaining returns the remaining budget for the group GB. If
-the budget
-is exhausted it returns Time_Span_Zero. This is the minimum value for a budget.
+the budget is exhausted it returns Time_Span_Zero. This is the minimum value
+for a budget.
 
 The procedure Set_Handler associates the handler Handler with the Group_Budget
-GB; if Handler is null, the Group_Budget is cleared, otherwise it is set.
+GB; if Handler is null, the handler of Group_Budget is cleared, otherwise it
+is set.
 
-A call of Set_Handler for a Group_Budget that is already set replaces the
-handler; if Handler is not null, the Group_Budget remains set.
+A call of Set_Handler for a Group_Budget that already has a handler set
+replaces the handler; if Handler is not null, the handler for Group_Budget
+remains set.
 
 The function Current_Handler returns the handler associated with the group
-budget GB if that group budget is set; otherwise it returns null.
+budget GB if the handler for that group budget is set; otherwise it returns
+null.
 
-The procedure Cancel_Handler clears the group budget if it is set. Cancelled is
-assigned True if the group budget was set prior to it being cleared; otherwise
-it is assigned False.
+The procedure Cancel_Handler clears the handler for the group budget if it is
+set. Cancelled is assigned True if the handler for the group budget was set
+prior to it being cleared; otherwise it is assigned False.
 
 The constant Min_Handler_Ceiling is the priority value that ensures
 that no ceiling violation would occur, were a handler to be executed.
@@ -159,7 +166,7 @@
 
 For all the operations defined in this package, Tasking_Error
 is raised if the task identified by T has terminated, and Program_Error
-is raised if the value of T is Ada.Task_Identification.Null_Task_ID.
+is raised if the value of T is Task_Identification.Null_Task_Id.
 
 An exception propagated from a handler invoked when the budget of a
 group of tasks becomes exhausted has no effect.
@@ -186,9 +193,9 @@
 
 Notes
 
-Clearing or setting of a group budget does not change the current value of
-the budget. Exhaustion or loading of a budget does not change whether the
-group budget is set or cleared.
+Clearing or setting of the handler of a group budget does not change the
+current value of the budget. Exhaustion or loading of a budget does not change
+whether the handler of the group budget is set or cleared.
 
 A Group_Budget_Handler can be associated with several Group_Budget objects.
 
@@ -331,25 +338,26 @@
 
 @xcode<@b<with> System;
 @b<package> Ada.Execution_Time.Group_Budgets @b<is>
+
   @b<type> Group_Budget @b<is limited private>;
 
   @b<type> Group_Budget_Handler @b<is access>
        @b<protected procedure> (GB : @b<in out> Group_Budget);
 
   @b<type> Task_Array @b<is array> (Positive @b<range> <@>) @b<of>
-                                  Ada.Task_Identification.Task_ID;
+                                  Ada.Task_Identification.Task_Id;
 
   Min_Handler_Ceiling : @b<constant> System.Any_Priority :=
     @ft<@i<implementation-defined>>;
 
   @b<procedure> Add_Task (GB : @b<in out> Group_Budget;
-                      T  : @b<in> Ada.Task_Identification.Task_ID);
+                      T  : @b<in> Ada.Task_Identification.Task_Id);
   @b<procedure> Remove_Task (GB: @b<in out> Group_Budget;
-                         T  : @b<in> Ada.Task_Identification.Task_ID);
+                         T  : @b<in> Ada.Task_Identification.Task_Id);
   @b<function> Is_Member (GB : Group_Budget;
-                      T : Ada.Task_Identification.Task_ID) @b<return> Boolean;
+                      T : Ada.Task_Identification.Task_Id) @b<return> Boolean;
   @b<function> Is_A_Group_Member
-     (T : Ada.Task_Identification.Task_ID) @b<return> Boolean;
+     (T : Ada.Task_Identification.Task_Id) @b<return> Boolean;
   @b<function> Members (GB : Group_Budget) @b<return> Task_Array;
 
   @b<procedure> Replenish (GB : @b<in out> Group_Budget; To : @b<in> Time_Span);
@@ -373,24 +381,37 @@
 of tasks. The type Group_Budget needs finalization (see 7.6). A task can belong to at most
 one group. Tasks of any priority can be added to a group.
 
-An object of type Group_Budget is said to be @i<set> if it is associated with a
-non-null Group_Budget_Handler and @i<cleared> otherwise. All Group_Budget
-objects are initially cleared. An object of type Group_Budget has an associated
-non-negative value of type Time_Span known as its @i<budget>.
-
-The type Group_Budget_Handler identifies a protected procedure to be executed by
-the implementation when the budget is exhausted. Such a protected procedure is
-called a @i<handler>.
+The type Group_Budget_Handler identifies a protected procedure to be
+executed by the implementation when the budget is @i<exhausted>, that is,
+reaches zero. Such a protected procedure is called a @i<handler>.
+
+An object of type Group_Budget has an associated non-negative value of
+type Time_Span known as its @i<budget>, which is initially Time_Span_Zero.
+It also has a value of type Group_Budget_Handler, known as its handler.
+The handler is said to be @i<set> if it is not null and @i<cleared> otherwise.
+The handler of all Group_Budget objects is initially cleared.
+
+An object of type Group_Budget has an associated non-negative value of
+type Time_Span known as its @i<budget>, which is initially Time_Span_Zero.
+The type Group_Budget_Handler identifies a protected procedure to be executed
+by the implementation when the budget is @i<exhausted>, that is, reaches
+zero. Such a protected procedure is called a @i<handler>.
+
+An object of type Group_Budget also includes a handler, which is a value of
+type Group_Budget_Handler. The handler of the
+object is said to be @i<set> if it is not null and @i<cleared> otherwise. The
+handler of all Group_Budget objects is initially cleared.
 
+
 @i<@s8<Dynamic Semantics>>
 
 The procedure Add_Task adds the task identified by T to the group GB; if that
 task is already a member of some other group, Group_Budget_Error is raised.
 
-The procedure Remove_Task removes the task identified by T from the group GB; if
-that task is not a member of the group GB, Group_Budget_Error is raised. After
-successful execution of this procedure, the task is no longer a member of any
-group.
+The procedure Remove_Task removes the task identified by T from the group GB;
+if that task is not a member of the group GB, Group_Budget_Error is raised.
+After successful execution of this procedure, the task is no longer a member of
+any group.
 
 The function Is_Member returns True if the task identified by T is a member of
 the group GB; otherwise it return False.
@@ -399,41 +420,45 @@
 member of some group; otherwise it returns False.
 
 The function Members returns an array of values of type
-Ada.Task_Identification.Task_ID identifying the members of the group GB. The
+Task_Identification.Task_Id identifying the members of the group GB. The
 order of the components of the array is unspecified.
 
 The procedure Replenish loads the group budget GB with the Time_Span value To.
 Group_Budget_Error is raised if the Time_Span value To is non-positive. Any
 execution of any member of the group of tasks results in the budget counting
-down. When the budget becomes exhausted (goes to Time_Span_Zero), the associated
-handler is executed if the group budget GB is set; the tasks continue to
-execute. An object of type Group_Budget is initially loaded with zero budget.
+down. When the budget becomes exhausted (reaches Time_Span_Zero), the
+associated handler is executed if the handler of group budget GB is set; the
+tasks continue to execute.
 
 The procedure Add modifies the budget of the group GB. A positive value for
 Interval increases the budget. A negative value for Interval reduces the budget,
 but never below Time_Span_Zero. A zero value for Interval has no effect. A call
-of procedure Add that results in the value of the budget going to Time_Span_Zero
-causes the associated handler to be executed if the group budget GB is set.
+of procedure Add that results in the value of the budget going to
+Time_Span_Zero causes the associated handler to be executed if the handler of
+the group budget GB is set.
 
 The function Budget_Has_Expired returns True if the budget of group GB is
 exhausted (equal to Time_Span_Zero); otherwise it returns False.
 
 The function Budget_Remaining returns the remaining budget for the group GB. If
-the budget
-is exhausted it returns Time_Span_Zero. This is the minimum value for a budget.
+the budget is exhausted it returns Time_Span_Zero. This is the minimum value
+for a budget.
 
 The procedure Set_Handler associates the handler Handler with the Group_Budget
-GB; if Handler is @b<null>, the Group_Budget is cleared, otherwise it is set.
+GB; if Handler is @b<null>, the handler of Group_Budget is cleared, otherwise
+it is set.
 
-A call of Set_Handler for a Group_Budget that is already set replaces the
-handler; if Handler is not @b<null>, the Group_Budget remains set.
+A call of Set_Handler for a Group_Budget that already has a handler set
+replaces the handler; if Handler is not @b<null>, the handler for Group_Budget
+remains set.
 
 The function Current_Handler returns the handler associated with the group
-budget GB if that group budget is set; otherwise it returns @b<null>.
+budget GB if the handler for that group budget is set; otherwise it returns
+@b<null>.
 
-The procedure Cancel_Handler clears the group budget if it is set. Cancelled is
-assigned True if the group budget was set prior to it being cleared; otherwise
-it is assigned False.
+The procedure Cancel_Handler clears the handler for the group budget if it is
+set. Cancelled is assigned True if the handler for the group budget was set
+prior to it being cleared; otherwise it is assigned False.
 
 The constant Min_Handler_Ceiling is the priority value that ensures
 that no ceiling violation would occur, were a handler to be executed.
@@ -450,7 +475,7 @@
 
 For all the operations defined in this package, Tasking_Error
 is raised if the task identified by T has terminated, and Program_Error
-is raised if the value of T is Ada.Task_Identification.Null_Task_ID.
+is raised if the value of T is Task_Identification.Null_Task_Id.
 
 An exception propagated from a handler invoked when the budget of a
 group of tasks becomes exhausted has no effect.
@@ -469,9 +494,9 @@
 respect to the execution of the handler.
 
 @xindent<@s9<NOTES@hr
-Clearing or setting of a group budget does not change the current value of
-the budget. Exhaustion or loading of a budget does not change whether the
-group budget is set or cleared.>>
+Clearing or setting of the handler of a group budget does not change the
+current value of the budget. Exhaustion or loading of a budget does not change
+whether the handler of the group budget is set or cleared.>>
 
 @xindent<@s9<A Group_Budget_Handler can be associated with several
 Group_Budget objects.>>

Questions? Ask the ACAA Technical Agent