Debian Codegraph @

gcc/ada/libgnarl/s-mudido.ads

raw
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 ------------------------------------------------------------------------------
15
16 with Ada.Real_Time;
17
18 with Ada.Task_Identification;
19
20 private with System.Tasking;
21
22 package System.Multiprocessors.Dispatching_Domains is
23
24 Dispatching_Domain_Error : exception;
25
26 type Dispatching_Domain (<>) is limited private;
27
28 System_Dispatching_Domain : constant Dispatching_Domain;
29
30 function Create (First : CPU; Last : CPU_Range) return Dispatching_Domain;
31
32 function Get_First_CPU (Domain : Dispatching_Domain) return CPU;
33
34 function Get_Last_CPU (Domain : Dispatching_Domain) return CPU_Range;
35
36 type CPU_Set is array (CPU range <>) of Boolean;
37
38 function Create (Set : CPU_Set) return Dispatching_Domain;
39
40 function Get_CPU_Set (Domain : Dispatching_Domain) return CPU_Set;
41
42 function Get_Dispatching_Domain
43 (T : Ada.Task_Identification.Task_Id :=
44 Ada.Task_Identification.Current_Task) return Dispatching_Domain;
45
46 procedure Assign_Task
47 (Domain : in out Dispatching_Domain;
48 CPU : CPU_Range := Not_A_Specific_CPU;
49 T : Ada.Task_Identification.Task_Id :=
50 Ada.Task_Identification.Current_Task);
51
52 procedure Set_CPU
53 (CPU : CPU_Range;
54 T : Ada.Task_Identification.Task_Id :=
55 Ada.Task_Identification.Current_Task);
56
57 function Get_CPU
58 (T : Ada.Task_Identification.Task_Id :=
59 Ada.Task_Identification.Current_Task) return CPU_Range;
60
61 procedure Delay_Until_And_Set_CPU
62 (Delay_Until_Time : Ada.Real_Time.Time;
63 CPU : CPU_Range);
64
65 private
66 type Dispatching_Domain is new System.Tasking.Dispatching_Domain_Access;
67
68 System_Dispatching_Domain : constant Dispatching_Domain :=
69 Dispatching_Domain
70 (System.Tasking.System_Domain);
71 end System.Multiprocessors.Dispatching_Domains;