1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . E X E C U T I O N _ T I M E . G R O U P _ B U D G E T S --
9 -- This specification is derived from the Ada Reference Manual for use with --
10 -- GNAT. In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification, provided that if you redistribute a --
12 -- modified version, any changes that you have made are clearly indicated. --
14 ------------------------------------------------------------------------------
16 -- This unit is not implemented in typical GNAT implementations that lie on
17 -- top of operating systems, because it is infeasible to implement in such
20 -- If a target environment provides appropriate support for this package,
21 -- then the Unimplemented_Unit pragma should be removed from this spec and
22 -- an appropriate body provided.
26 package Ada.Execution_Time.Group_Budgets is
29 pragma Unimplemented_Unit;
31 type Group_Budget is tagged limited private;
33 type Group_Budget_Handler is access
34 protected procedure (GB : in out Group_Budget);
37 array (Positive range <>) of Ada.Task_Identification.Task_Id;
39 Min_Handler_Ceiling : constant System.Any_Priority :=
40 System.Any_Priority'First;
41 -- Initial value is an arbitrary choice ???
44 (GB : in out Group_Budget;
45 T : Ada.Task_Identification.Task_Id);
48 (GB : in out Group_Budget;
49 T : Ada.Task_Identification.Task_Id);
53 T : Ada.Task_Identification.Task_Id) return Boolean;
55 function Is_A_Group_Member
56 (T : Ada.Task_Identification.Task_Id) return Boolean;
58 function Members (GB : Group_Budget) return Task_Array;
61 (GB : in out Group_Budget;
62 To : Ada.Real_Time.Time_Span);
65 (GB : in out Group_Budget;
66 Interval : Ada.Real_Time.Time_Span);
68 function Budget_Has_Expired (GB : Group_Budget) return Boolean;
70 function Budget_Remaining
71 (GB : Group_Budget) return Ada.Real_Time.Time_Span;
74 (GB : in out Group_Budget;
75 Handler : Group_Budget_Handler);
77 function Current_Handler (GB : Group_Budget) return Group_Budget_Handler;
79 procedure Cancel_Handler
80 (GB : in out Group_Budget;
81 Cancelled : out Boolean);
83 Group_Budget_Error : exception;
86 type Group_Budget is tagged limited null record;
87 end Ada.Execution_Time.Group_Budgets;