2009-10-01 Tobias Burnus <burnus@net-b.de>
[official-gcc/alias-decl.git] / gcc / ada / s-taprop-dummy.adb
blob38264ba5c88123f4678d36d81ad33854a8fa901c
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-2009, 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 -- This is a no tasking version of this package
34 -- This package contains all the GNULL primitives that interface directly with
35 -- the underlying OS.
37 pragma Polling (Off);
38 -- Turn off polling, we do not want ATC polling to take place during tasking
39 -- operations. It causes infinite loops and other problems.
41 with System.Error_Reporting;
43 package body System.Task_Primitives.Operations is
45 use System.Tasking;
46 use System.Parameters;
48 pragma Warnings (Off);
49 -- Turn off warnings since so many unreferenced parameters
51 ----------------
52 -- Abort_Task --
53 ----------------
55 procedure Abort_Task (T : Task_Id) is
56 begin
57 null;
58 end Abort_Task;
60 ----------------
61 -- Check_Exit --
62 ----------------
64 function Check_Exit (Self_ID : ST.Task_Id) return Boolean is
65 begin
66 return True;
67 end Check_Exit;
69 --------------------
70 -- Check_No_Locks --
71 --------------------
73 function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is
74 begin
75 return True;
76 end Check_No_Locks;
78 -------------------
79 -- Continue_Task --
80 -------------------
82 function Continue_Task (T : ST.Task_Id) return Boolean is
83 begin
84 return False;
85 end Continue_Task;
87 -------------------
88 -- Current_State --
89 -------------------
91 function Current_State (S : Suspension_Object) return Boolean is
92 begin
93 return False;
94 end Current_State;
96 ----------------------
97 -- Environment_Task --
98 ----------------------
100 function Environment_Task return Task_Id is
101 begin
102 return null;
103 end Environment_Task;
105 -----------------
106 -- Create_Task --
107 -----------------
109 procedure Create_Task
110 (T : Task_Id;
111 Wrapper : System.Address;
112 Stack_Size : System.Parameters.Size_Type;
113 Priority : System.Any_Priority;
114 Succeeded : out Boolean)
116 begin
117 Succeeded := False;
118 end Create_Task;
120 ----------------
121 -- Enter_Task --
122 ----------------
124 procedure Enter_Task (Self_ID : Task_Id) is
125 begin
126 null;
127 end Enter_Task;
129 ---------------
130 -- Exit_Task --
131 ---------------
133 procedure Exit_Task is
134 begin
135 null;
136 end Exit_Task;
138 --------------
139 -- Finalize --
140 --------------
142 procedure Finalize (S : in out Suspension_Object) is
143 begin
144 null;
145 end Finalize;
147 -------------------
148 -- Finalize_Lock --
149 -------------------
151 procedure Finalize_Lock (L : not null access Lock) is
152 begin
153 null;
154 end Finalize_Lock;
156 procedure Finalize_Lock (L : not null access RTS_Lock) is
157 begin
158 null;
159 end Finalize_Lock;
161 ------------------
162 -- Finalize_TCB --
163 ------------------
165 procedure Finalize_TCB (T : Task_Id) is
166 begin
167 null;
168 end Finalize_TCB;
170 ------------------
171 -- Get_Priority --
172 ------------------
174 function Get_Priority (T : Task_Id) return System.Any_Priority is
175 begin
176 return 0;
177 end Get_Priority;
179 --------------------
180 -- Get_Thread_Id --
181 --------------------
183 function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is
184 begin
185 return OSI.Thread_Id (T.Common.LL.Thread);
186 end Get_Thread_Id;
188 ----------------
189 -- Initialize --
190 ----------------
192 procedure Initialize (Environment_Task : Task_Id) is
193 No_Tasking : Boolean;
194 begin
195 No_Tasking :=
196 System.Error_Reporting.Shutdown
197 ("Tasking not implemented on this configuration");
198 end Initialize;
200 procedure Initialize (S : in out Suspension_Object) is
201 begin
202 null;
203 end Initialize;
205 ---------------------
206 -- Initialize_Lock --
207 ---------------------
209 procedure Initialize_Lock
210 (Prio : System.Any_Priority;
211 L : not null access Lock)
213 begin
214 null;
215 end Initialize_Lock;
217 procedure Initialize_Lock
218 (L : not null access RTS_Lock; Level : Lock_Level) is
219 begin
220 null;
221 end Initialize_Lock;
223 --------------------
224 -- Initialize_TCB --
225 --------------------
227 procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
228 begin
229 Succeeded := False;
230 end Initialize_TCB;
232 -------------------
233 -- Is_Valid_Task --
234 -------------------
236 function Is_Valid_Task return Boolean is
237 begin
238 return False;
239 end Is_Valid_Task;
241 --------------
242 -- Lock_RTS --
243 --------------
245 procedure Lock_RTS is
246 begin
247 null;
248 end Lock_RTS;
250 ---------------------
251 -- Monotonic_Clock --
252 ---------------------
254 function Monotonic_Clock return Duration is
255 begin
256 return 0.0;
257 end Monotonic_Clock;
259 --------------
260 -- New_ATCB --
261 --------------
263 function New_ATCB (Entry_Num : Task_Entry_Index) return Task_Id is
264 begin
265 return new Ada_Task_Control_Block (Entry_Num);
266 end New_ATCB;
268 ---------------
269 -- Read_Lock --
270 ---------------
272 procedure Read_Lock
273 (L : not null access Lock;
274 Ceiling_Violation : out Boolean)
276 begin
277 Ceiling_Violation := False;
278 end Read_Lock;
280 -----------------------------
281 -- Register_Foreign_Thread --
282 -----------------------------
284 function Register_Foreign_Thread return Task_Id is
285 begin
286 return null;
287 end Register_Foreign_Thread;
289 -----------------
290 -- Resume_Task --
291 -----------------
293 function Resume_Task
294 (T : ST.Task_Id;
295 Thread_Self : OSI.Thread_Id) return Boolean
297 begin
298 return False;
299 end Resume_Task;
301 -------------------
302 -- RT_Resolution --
303 -------------------
305 function RT_Resolution return Duration is
306 begin
307 return 10#1.0#E-6;
308 end RT_Resolution;
310 ----------
311 -- Self --
312 ----------
314 function Self return Task_Id is
315 begin
316 return Null_Task;
317 end Self;
319 -----------------
320 -- Set_Ceiling --
321 -----------------
323 procedure Set_Ceiling
324 (L : not null access Lock;
325 Prio : System.Any_Priority)
327 begin
328 null;
329 end Set_Ceiling;
331 ---------------
332 -- Set_False --
333 ---------------
335 procedure Set_False (S : in out Suspension_Object) is
336 begin
337 null;
338 end Set_False;
340 ------------------
341 -- Set_Priority --
342 ------------------
344 procedure Set_Priority
345 (T : Task_Id;
346 Prio : System.Any_Priority;
347 Loss_Of_Inheritance : Boolean := False)
349 begin
350 null;
351 end Set_Priority;
353 --------------
354 -- Set_True --
355 --------------
357 procedure Set_True (S : in out Suspension_Object) is
358 begin
359 null;
360 end Set_True;
362 -----------
363 -- Sleep --
364 -----------
366 procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is
367 begin
368 null;
369 end Sleep;
371 -----------------
372 -- Stack_Guard --
373 -----------------
375 procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is
376 begin
377 null;
378 end Stack_Guard;
380 ------------------
381 -- Suspend_Task --
382 ------------------
384 function Suspend_Task
385 (T : ST.Task_Id;
386 Thread_Self : OSI.Thread_Id) return Boolean
388 begin
389 return False;
390 end Suspend_Task;
392 --------------------
393 -- Stop_All_Tasks --
394 --------------------
396 procedure Stop_All_Tasks is
397 begin
398 null;
399 end Stop_All_Tasks;
401 ---------------
402 -- Stop_Task --
403 ---------------
405 function Stop_Task (T : ST.Task_Id) return Boolean is
406 pragma Unreferenced (T);
407 begin
408 return False;
409 end Stop_Task;
411 ------------------------
412 -- Suspend_Until_True --
413 ------------------------
415 procedure Suspend_Until_True (S : in out Suspension_Object) is
416 begin
417 null;
418 end Suspend_Until_True;
420 -----------------
421 -- Timed_Delay --
422 -----------------
424 procedure Timed_Delay
425 (Self_ID : Task_Id;
426 Time : Duration;
427 Mode : ST.Delay_Modes)
429 begin
430 null;
431 end Timed_Delay;
433 -----------------
434 -- Timed_Sleep --
435 -----------------
437 procedure Timed_Sleep
438 (Self_ID : Task_Id;
439 Time : Duration;
440 Mode : ST.Delay_Modes;
441 Reason : System.Tasking.Task_States;
442 Timedout : out Boolean;
443 Yielded : out Boolean)
445 begin
446 Timedout := False;
447 Yielded := False;
448 end Timed_Sleep;
450 ------------
451 -- Unlock --
452 ------------
454 procedure Unlock (L : not null access Lock) is
455 begin
456 null;
457 end Unlock;
459 procedure Unlock
460 (L : not null access RTS_Lock;
461 Global_Lock : Boolean := False)
463 begin
464 null;
465 end Unlock;
467 procedure Unlock (T : Task_Id) is
468 begin
469 null;
470 end Unlock;
472 ----------------
473 -- Unlock_RTS --
474 ----------------
476 procedure Unlock_RTS is
477 begin
478 null;
479 end Unlock_RTS;
480 ------------
481 -- Wakeup --
482 ------------
484 procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is
485 begin
486 null;
487 end Wakeup;
489 ----------------
490 -- Write_Lock --
491 ----------------
493 procedure Write_Lock
494 (L : not null access Lock;
495 Ceiling_Violation : out Boolean)
497 begin
498 Ceiling_Violation := False;
499 end Write_Lock;
501 procedure Write_Lock
502 (L : not null access RTS_Lock;
503 Global_Lock : Boolean := False)
505 begin
506 null;
507 end Write_Lock;
509 procedure Write_Lock (T : Task_Id) is
510 begin
511 null;
512 end Write_Lock;
514 -----------
515 -- Yield --
516 -----------
518 procedure Yield (Do_Yield : Boolean := True) is
519 begin
520 null;
521 end Yield;
523 end System.Task_Primitives.Operations;