2014-02-20 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ada / s-mudido.adb
blob990a7bc63421c1fed6883b9a6de1b318b168717b
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- SYSTEM.MULTIPROCESSORS.DISPATCHING_DOMAINS --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 2011, Free Software Foundation, Inc. --
10 -- --
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. --
17 -- --
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. --
21 -- --
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/>. --
26 -- --
27 -- GNARL was developed by the GNARL team at Florida State University. --
28 -- Extensive contributions were provided by Ada Core Technologies, Inc. --
29 -- --
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;
42 pragma Export
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.
49 -----------------
50 -- Assign_Task --
51 -----------------
53 procedure Assign_Task
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);
60 begin
61 raise Dispatching_Domain_Error with "dispatching domains not supported";
62 end Assign_Task;
64 ------------
65 -- Create --
66 ------------
68 function Create (First, Last : CPU) return Dispatching_Domain is
69 pragma Unreferenced (First, Last);
70 begin
71 raise Dispatching_Domain_Error with "dispatching domains not supported";
72 return System_Dispatching_Domain;
73 end Create;
75 -----------------------------
76 -- Delay_Until_And_Set_CPU --
77 -----------------------------
79 procedure Delay_Until_And_Set_CPU
80 (Delay_Until_Time : Ada.Real_Time.Time;
81 CPU : CPU_Range)
83 pragma Unreferenced (Delay_Until_Time, CPU);
84 begin
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
93 begin
94 null;
95 end Freeze_Dispatching_Domains;
97 -------------
98 -- Get_CPU --
99 -------------
101 function Get_CPU
102 (T : Ada.Task_Identification.Task_Id :=
103 Ada.Task_Identification.Current_Task) return CPU_Range
105 pragma Unreferenced (T);
106 begin
107 return Not_A_Specific_CPU;
108 end Get_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);
119 begin
120 return System_Dispatching_Domain;
121 end Get_Dispatching_Domain;
123 -------------------
124 -- Get_First_CPU --
125 -------------------
127 function Get_First_CPU (Domain : Dispatching_Domain) return CPU is
128 pragma Unreferenced (Domain);
129 begin
130 return CPU'First;
131 end Get_First_CPU;
133 ------------------
134 -- Get_Last_CPU --
135 ------------------
137 function Get_Last_CPU (Domain : Dispatching_Domain) return CPU is
138 pragma Unreferenced (Domain);
139 begin
140 return Number_Of_CPUs;
141 end Get_Last_CPU;
143 -------------
144 -- Set_CPU --
145 -------------
147 procedure Set_CPU
148 (CPU : CPU_Range;
149 T : Ada.Task_Identification.Task_Id :=
150 Ada.Task_Identification.Current_Task)
152 pragma Unreferenced (CPU, T);
153 begin
154 raise Dispatching_Domain_Error with "dispatching domains not supported";
155 end Set_CPU;
157 end System.Multiprocessors.Dispatching_Domains;