[19/77] Add a smallest_int_mode_for_size helper function
[official-gcc.git] / gcc / ada / s-mudido.ads
blob06e48bd1b9c04d4a52e4f600fc9844cd30e67e90
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- SYSTEM.MULTIPROCESSORS.DISPATCHING_DOMAINS --
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 with Ada.Real_Time;
18 with Ada.Task_Identification;
20 private with System.Tasking;
22 package System.Multiprocessors.Dispatching_Domains is
23 -- pragma Preelaborate (Dispatching_Domains);
24 -- ??? According to AI 167 this unit should be preelaborate, but it cannot
25 -- be preelaborate because it depends on Ada.Real_Time which is not
26 -- preelaborate.
28 Dispatching_Domain_Error : exception;
30 type Dispatching_Domain (<>) is limited private;
32 System_Dispatching_Domain : constant Dispatching_Domain;
34 function Create (First : CPU; Last : CPU_Range) return Dispatching_Domain;
36 function Get_First_CPU (Domain : Dispatching_Domain) return CPU;
38 function Get_Last_CPU (Domain : Dispatching_Domain) return CPU_Range;
40 type CPU_Set is array (CPU range <>) of Boolean;
42 function Create (Set : CPU_Set) return Dispatching_Domain;
44 function Get_CPU_Set (Domain : Dispatching_Domain) return CPU_Set;
46 function Get_Dispatching_Domain
47 (T : Ada.Task_Identification.Task_Id :=
48 Ada.Task_Identification.Current_Task) return Dispatching_Domain;
50 procedure Assign_Task
51 (Domain : in out Dispatching_Domain;
52 CPU : CPU_Range := Not_A_Specific_CPU;
53 T : Ada.Task_Identification.Task_Id :=
54 Ada.Task_Identification.Current_Task);
56 procedure Set_CPU
57 (CPU : CPU_Range;
58 T : Ada.Task_Identification.Task_Id :=
59 Ada.Task_Identification.Current_Task);
61 function Get_CPU
62 (T : Ada.Task_Identification.Task_Id :=
63 Ada.Task_Identification.Current_Task) return CPU_Range;
65 procedure Delay_Until_And_Set_CPU
66 (Delay_Until_Time : Ada.Real_Time.Time;
67 CPU : CPU_Range);
69 private
70 type Dispatching_Domain is new System.Tasking.Dispatching_Domain_Access;
72 System_Dispatching_Domain : constant Dispatching_Domain :=
73 Dispatching_Domain
74 (System.Tasking.System_Domain);
75 end System.Multiprocessors.Dispatching_Domains;