1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- SYSTEM.MULTIPROCESSORS.DISPATCHING_DOMAINS --
9 -- Copyright (C) 2011, Free Software Foundation, Inc. --
11 -- GNARL is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNARL was developed by the GNARL team at Florida State University. --
28 -- Extensive contributions were provided by Ada Core Technologies, Inc. --
30 ------------------------------------------------------------------------------
32 -- Body used on unimplemented targets, where the operating system does not
33 -- support setting task affinities.
35 package body System
.Multiprocessors
.Dispatching_Domains
is
37 -----------------------
38 -- Local subprograms --
39 -----------------------
41 procedure Freeze_Dispatching_Domains
;
43 (Ada
, Freeze_Dispatching_Domains
, "__gnat_freeze_dispatching_domains");
44 -- Signal the time when no new dispatching domains can be created. It
45 -- should be called before the environment task calls the main procedure
46 -- (and after the elaboration code), so the binder-generated file needs to
47 -- import and call this procedure.
54 (Domain
: in out Dispatching_Domain
;
55 CPU
: CPU_Range
:= Not_A_Specific_CPU
;
56 T
: Ada
.Task_Identification
.Task_Id
:=
57 Ada
.Task_Identification
.Current_Task
)
59 pragma Unreferenced
(Domain
, CPU
, T
);
61 raise Dispatching_Domain_Error
with "dispatching domains not supported";
68 function Create
(First
, Last
: CPU
) return Dispatching_Domain
is
69 pragma Unreferenced
(First
, Last
);
71 raise Dispatching_Domain_Error
with "dispatching domains not supported";
72 return System_Dispatching_Domain
;
75 -----------------------------
76 -- Delay_Until_And_Set_CPU --
77 -----------------------------
79 procedure Delay_Until_And_Set_CPU
80 (Delay_Until_Time
: Ada
.Real_Time
.Time
;
83 pragma Unreferenced
(Delay_Until_Time
, CPU
);
85 raise Dispatching_Domain_Error
with "dispatching domains not supported";
86 end Delay_Until_And_Set_CPU
;
88 --------------------------------
89 -- Freeze_Dispatching_Domains --
90 --------------------------------
92 procedure Freeze_Dispatching_Domains
is
95 end Freeze_Dispatching_Domains
;
102 (T
: Ada
.Task_Identification
.Task_Id
:=
103 Ada
.Task_Identification
.Current_Task
) return CPU_Range
105 pragma Unreferenced
(T
);
107 return Not_A_Specific_CPU
;
110 ----------------------------
111 -- Get_Dispatching_Domain --
112 ----------------------------
114 function Get_Dispatching_Domain
115 (T
: Ada
.Task_Identification
.Task_Id
:=
116 Ada
.Task_Identification
.Current_Task
) return Dispatching_Domain
118 pragma Unreferenced
(T
);
120 return System_Dispatching_Domain
;
121 end Get_Dispatching_Domain
;
127 function Get_First_CPU
(Domain
: Dispatching_Domain
) return CPU
is
128 pragma Unreferenced
(Domain
);
137 function Get_Last_CPU
(Domain
: Dispatching_Domain
) return CPU
is
138 pragma Unreferenced
(Domain
);
140 return Number_Of_CPUs
;
149 T
: Ada
.Task_Identification
.Task_Id
:=
150 Ada
.Task_Identification
.Current_Task
)
152 pragma Unreferenced
(CPU
, T
);
154 raise Dispatching_Domain_Error
with "dispatching domains not supported";
157 end System
.Multiprocessors
.Dispatching_Domains
;