1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- SYSTEM.MULTIPROCESSORS.DISPATCHING_DOMAINS --
9 -- Copyright (C) 2011-2014, 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
: CPU
; Last
: CPU_Range
) return Dispatching_Domain
is
69 pragma Unreferenced
(First
, Last
);
71 return raise Dispatching_Domain_Error
with
72 "dispatching domains not supported";
75 function Create
(Set
: CPU_Set
) return Dispatching_Domain
is
76 pragma Unreferenced
(Set
);
78 return raise Dispatching_Domain_Error
with
79 "dispatching domains not supported";
82 -----------------------------
83 -- Delay_Until_And_Set_CPU --
84 -----------------------------
86 procedure Delay_Until_And_Set_CPU
87 (Delay_Until_Time
: Ada
.Real_Time
.Time
;
90 pragma Unreferenced
(Delay_Until_Time
, CPU
);
92 raise Dispatching_Domain_Error
with "dispatching domains not supported";
93 end Delay_Until_And_Set_CPU
;
95 --------------------------------
96 -- Freeze_Dispatching_Domains --
97 --------------------------------
99 procedure Freeze_Dispatching_Domains
is
102 end Freeze_Dispatching_Domains
;
109 (T
: Ada
.Task_Identification
.Task_Id
:=
110 Ada
.Task_Identification
.Current_Task
) return CPU_Range
112 pragma Unreferenced
(T
);
114 return Not_A_Specific_CPU
;
121 function Get_CPU_Set
(Domain
: Dispatching_Domain
) return CPU_Set
is
122 pragma Unreferenced
(Domain
);
124 return raise Dispatching_Domain_Error
125 with "dispatching domains not supported";
128 ----------------------------
129 -- Get_Dispatching_Domain --
130 ----------------------------
132 function Get_Dispatching_Domain
133 (T
: Ada
.Task_Identification
.Task_Id
:=
134 Ada
.Task_Identification
.Current_Task
) return Dispatching_Domain
136 pragma Unreferenced
(T
);
138 return System_Dispatching_Domain
;
139 end Get_Dispatching_Domain
;
145 function Get_First_CPU
(Domain
: Dispatching_Domain
) return CPU
is
146 pragma Unreferenced
(Domain
);
155 function Get_Last_CPU
(Domain
: Dispatching_Domain
) return CPU_Range
is
156 pragma Unreferenced
(Domain
);
158 return Number_Of_CPUs
;
167 T
: Ada
.Task_Identification
.Task_Id
:=
168 Ada
.Task_Identification
.Current_Task
)
170 pragma Unreferenced
(CPU
, T
);
172 raise Dispatching_Domain_Error
with "dispatching domains not supported";
175 end System
.Multiprocessors
.Dispatching_Domains
;