* g++.dg/template/using30.C: Move ...
[official-gcc.git] / gcc / ada / a-etgrbu.ads
blob1c86cee792569ab104efb2eb331b51ac302c2326
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
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 --
6 -- --
7 -- S p e c --
8 -- --
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. --
13 -- --
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
18 -- environments.
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.
24 with System;
26 package Ada.Execution_Time.Group_Budgets is
27 pragma Preelaborate;
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);
36 type Task_Array is
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 ???
43 procedure Add_Task
44 (GB : in out Group_Budget;
45 T : Ada.Task_Identification.Task_Id);
47 procedure Remove_Task
48 (GB : in out Group_Budget;
49 T : Ada.Task_Identification.Task_Id);
51 function Is_Member
52 (GB : Group_Budget;
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;
60 procedure Replenish
61 (GB : in out Group_Budget;
62 To : Ada.Real_Time.Time_Span);
64 procedure Add
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;
73 procedure Set_Handler
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;
85 private
86 type Group_Budget is tagged limited null record;
87 end Ada.Execution_Time.Group_Budgets;