* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / ada / s-taprop-dummy.adb
blob873b1fd78aea05e6388d2f22b5da80bec0fffaa8
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . T A S K _ P R I M I T I V E S . O P E R A T I O N S --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2005, 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 2, or (at your option) any later ver- --
14 -- sion. GNARL 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNARL; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNARL was developed by the GNARL team at Florida State University. --
30 -- Extensive contributions were provided by Ada Core Technologies, Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 -- This is a no tasking version of this package
36 -- This package contains all the GNULL primitives that interface directly
37 -- with the underlying OS.
39 pragma Polling (Off);
40 -- Turn off polling, we do not want ATC polling to take place during
41 -- tasking operations. It causes infinite loops and other problems.
43 with System.Error_Reporting;
44 -- used for Shutdown
46 package body System.Task_Primitives.Operations is
48 use System.Tasking;
49 use System.Parameters;
51 pragma Warnings (Off);
52 -- Turn off warnings since so many unreferenced parameters
54 ----------------
55 -- Abort_Task --
56 ----------------
58 procedure Abort_Task (T : Task_Id) is
59 begin
60 null;
61 end Abort_Task;
63 ----------------
64 -- Check_Exit --
65 ----------------
67 -- Dummy version
69 function Check_Exit (Self_ID : ST.Task_Id) return Boolean is
70 begin
71 return True;
72 end Check_Exit;
74 --------------------
75 -- Check_No_Locks --
76 --------------------
78 function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is
79 begin
80 return True;
81 end Check_No_Locks;
83 -------------------
84 -- Current_State --
85 -------------------
87 function Current_State (S : Suspension_Object) return Boolean is
88 begin
89 return False;
90 end Current_State;
92 ----------------------
93 -- Environment_Task --
94 ----------------------
96 function Environment_Task return Task_Id is
97 begin
98 return null;
99 end Environment_Task;
101 -----------------
102 -- Create_Task --
103 -----------------
105 procedure Create_Task
106 (T : Task_Id;
107 Wrapper : System.Address;
108 Stack_Size : System.Parameters.Size_Type;
109 Priority : System.Any_Priority;
110 Succeeded : out Boolean)
112 begin
113 Succeeded := False;
114 end Create_Task;
116 ----------------
117 -- Enter_Task --
118 ----------------
120 procedure Enter_Task (Self_ID : Task_Id) is
121 begin
122 null;
123 end Enter_Task;
125 ---------------
126 -- Exit_Task --
127 ---------------
129 procedure Exit_Task is
130 begin
131 null;
132 end Exit_Task;
134 --------------
135 -- Finalize --
136 --------------
138 procedure Finalize (S : in out Suspension_Object) is
139 begin
140 null;
141 end Finalize;
143 -------------------
144 -- Finalize_Lock --
145 -------------------
147 procedure Finalize_Lock (L : access Lock) is
148 begin
149 null;
150 end Finalize_Lock;
152 procedure Finalize_Lock (L : access RTS_Lock) is
153 begin
154 null;
155 end Finalize_Lock;
157 ------------------
158 -- Finalize_TCB --
159 ------------------
161 procedure Finalize_TCB (T : Task_Id) is
162 begin
163 null;
164 end Finalize_TCB;
166 ------------------
167 -- Get_Priority --
168 ------------------
170 function Get_Priority (T : Task_Id) return System.Any_Priority is
171 begin
172 return 0;
173 end Get_Priority;
175 --------------------
176 -- Get_Thread_Id --
177 --------------------
179 function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is
180 begin
181 return OSI.Thread_Id (T.Common.LL.Thread);
182 end Get_Thread_Id;
184 ----------------
185 -- Initialize --
186 ----------------
188 procedure Initialize (Environment_Task : Task_Id) is
189 No_Tasking : Boolean;
190 begin
191 No_Tasking :=
192 System.Error_Reporting.Shutdown
193 ("Tasking not implemented on this configuration");
194 end Initialize;
196 procedure Initialize (S : in out Suspension_Object) is
197 begin
198 null;
199 end Initialize;
201 ---------------------
202 -- Initialize_Lock --
203 ---------------------
205 procedure Initialize_Lock
206 (Prio : System.Any_Priority;
207 L : access Lock)
209 begin
210 null;
211 end Initialize_Lock;
213 procedure Initialize_Lock (L : access RTS_Lock; Level : Lock_Level) is
214 begin
215 null;
216 end Initialize_Lock;
218 --------------------
219 -- Initialize_TCB --
220 --------------------
222 procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
223 begin
224 Succeeded := False;
225 end Initialize_TCB;
227 -------------------
228 -- Is_Valid_Task --
229 -------------------
231 function Is_Valid_Task return Boolean is
232 begin
233 return False;
234 end Is_Valid_Task;
236 --------------
237 -- Lock_RTS --
238 --------------
240 procedure Lock_RTS is
241 begin
242 null;
243 end Lock_RTS;
245 ---------------------
246 -- Monotonic_Clock --
247 ---------------------
249 function Monotonic_Clock return Duration is
250 begin
251 return 0.0;
252 end Monotonic_Clock;
254 --------------
255 -- New_ATCB --
256 --------------
258 function New_ATCB (Entry_Num : Task_Entry_Index) return Task_Id is
259 begin
260 return new Ada_Task_Control_Block (Entry_Num);
261 end New_ATCB;
263 ---------------
264 -- Read_Lock --
265 ---------------
267 procedure Read_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
268 begin
269 Ceiling_Violation := False;
270 end Read_Lock;
272 -----------------------------
273 -- Register_Foreign_Thread --
274 -----------------------------
276 function Register_Foreign_Thread return Task_Id is
277 begin
278 return null;
279 end Register_Foreign_Thread;
281 -----------------
282 -- Resume_Task --
283 -----------------
285 function Resume_Task
286 (T : ST.Task_Id;
287 Thread_Self : OSI.Thread_Id) return Boolean
289 begin
290 return False;
291 end Resume_Task;
293 -------------------
294 -- RT_Resolution --
295 -------------------
297 function RT_Resolution return Duration is
298 begin
299 return 10#1.0#E-6;
300 end RT_Resolution;
302 ----------
303 -- Self --
304 ----------
306 function Self return Task_Id is
307 begin
308 return Null_Task;
309 end Self;
311 ---------------
312 -- Set_False --
313 ---------------
315 procedure Set_False (S : in out Suspension_Object) is
316 begin
317 null;
318 end Set_False;
320 ------------------
321 -- Set_Priority --
322 ------------------
324 procedure Set_Priority
325 (T : Task_Id;
326 Prio : System.Any_Priority;
327 Loss_Of_Inheritance : Boolean := False)
329 begin
330 null;
331 end Set_Priority;
333 --------------
334 -- Set_True --
335 --------------
337 procedure Set_True (S : in out Suspension_Object) is
338 begin
339 null;
340 end Set_True;
342 -----------
343 -- Sleep --
344 -----------
346 procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is
347 begin
348 null;
349 end Sleep;
351 -----------------
352 -- Stack_Guard --
353 -----------------
355 procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is
356 begin
357 null;
358 end Stack_Guard;
360 ------------------
361 -- Suspend_Task --
362 ------------------
364 function Suspend_Task
365 (T : ST.Task_Id;
366 Thread_Self : OSI.Thread_Id) return Boolean
368 begin
369 return False;
370 end Suspend_Task;
372 ------------------------
373 -- Suspend_Until_True --
374 ------------------------
376 procedure Suspend_Until_True (S : in out Suspension_Object) is
377 begin
378 null;
379 end Suspend_Until_True;
381 -----------------
382 -- Timed_Delay --
383 -----------------
385 procedure Timed_Delay
386 (Self_ID : Task_Id;
387 Time : Duration;
388 Mode : ST.Delay_Modes)
390 begin
391 null;
392 end Timed_Delay;
394 -----------------
395 -- Timed_Sleep --
396 -----------------
398 procedure Timed_Sleep
399 (Self_ID : Task_Id;
400 Time : Duration;
401 Mode : ST.Delay_Modes;
402 Reason : System.Tasking.Task_States;
403 Timedout : out Boolean;
404 Yielded : out Boolean)
406 begin
407 Timedout := False;
408 Yielded := False;
409 end Timed_Sleep;
411 ------------
412 -- Unlock --
413 ------------
415 procedure Unlock (L : access Lock) is
416 begin
417 null;
418 end Unlock;
420 procedure Unlock (L : access RTS_Lock; Global_Lock : Boolean := False) is
421 begin
422 null;
423 end Unlock;
425 procedure Unlock (T : Task_Id) is
426 begin
427 null;
428 end Unlock;
430 ----------------
431 -- Unlock_RTS --
432 ----------------
434 procedure Unlock_RTS is
435 begin
436 null;
437 end Unlock_RTS;
438 ------------
439 -- Wakeup --
440 ------------
442 procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is
443 begin
444 null;
445 end Wakeup;
447 ----------------
448 -- Write_Lock --
449 ----------------
451 procedure Write_Lock (L : access Lock; Ceiling_Violation : out Boolean) is
452 begin
453 Ceiling_Violation := False;
454 end Write_Lock;
456 procedure Write_Lock
457 (L : access RTS_Lock;
458 Global_Lock : Boolean := False)
460 begin
461 null;
462 end Write_Lock;
464 procedure Write_Lock (T : Task_Id) is
465 begin
466 null;
467 end Write_Lock;
469 -----------
470 -- Yield --
471 -----------
473 procedure Yield (Do_Yield : Boolean := True) is
474 begin
475 null;
476 end Yield;
478 end System.Task_Primitives.Operations;