]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/s-taprop-dummy.adb
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / s-taprop-dummy.adb
CommitLineData
84481f76
RK
1------------------------------------------------------------------------------
2-- --
b497b460 3-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
84481f76
RK
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-- --
c37cbdc3 9-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
84481f76
RK
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- --
748086b7
JJ
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- --
84481f76 15-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
748086b7
JJ
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/>. --
84481f76 26-- --
fbf5a39b
AC
27-- GNARL was developed by the GNARL team at Florida State University. --
28-- Extensive contributions were provided by Ada Core Technologies, Inc. --
84481f76
RK
29-- --
30------------------------------------------------------------------------------
31
32-- This is a no tasking version of this package
33
366b8af7
RD
34-- This package contains all the GNULL primitives that interface directly with
35-- the underlying OS.
84481f76
RK
36
37pragma Polling (Off);
366b8af7
RD
38-- Turn off polling, we do not want ATC polling to take place during tasking
39-- operations. It causes infinite loops and other problems.
84481f76 40
84481f76
RK
41package body System.Task_Primitives.Operations is
42
43 use System.Tasking;
44 use System.Parameters;
84481f76 45
bcea76b6
GB
46 pragma Warnings (Off);
47 -- Turn off warnings since so many unreferenced parameters
48
f4f92d9d
AC
49 ----------------------------------
50 -- ATCB allocation/deallocation --
51 ----------------------------------
52
53 package body ATCB_Allocation is separate;
54 -- The body of this package is shared across several targets
55
15ce9ca2
AC
56 ----------------
57 -- Abort_Task --
58 ----------------
59
60 procedure Abort_Task (T : Task_Id) is
84481f76
RK
61 begin
62 null;
15ce9ca2
AC
63 end Abort_Task;
64
65 ----------------
66 -- Check_Exit --
67 ----------------
68
15ce9ca2
AC
69 function Check_Exit (Self_ID : ST.Task_Id) return Boolean is
70 begin
71 return True;
72 end Check_Exit;
84481f76
RK
73
74 --------------------
15ce9ca2 75 -- Check_No_Locks --
84481f76
RK
76 --------------------
77
15ce9ca2 78 function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is
84481f76 79 begin
15ce9ca2
AC
80 return True;
81 end Check_No_Locks;
84481f76 82
c9b9ec14
JG
83 -------------------
84 -- Continue_Task --
85 -------------------
86
87 function Continue_Task (T : ST.Task_Id) return Boolean is
88 begin
89 return False;
90 end Continue_Task;
91
b497b460
JR
92 -------------------
93 -- Current_State --
94 -------------------
95
96 function Current_State (S : Suspension_Object) return Boolean is
97 begin
98 return False;
99 end Current_State;
100
15ce9ca2
AC
101 ----------------------
102 -- Environment_Task --
103 ----------------------
84481f76 104
15ce9ca2 105 function Environment_Task return Task_Id is
84481f76 106 begin
15ce9ca2
AC
107 return null;
108 end Environment_Task;
84481f76 109
15ce9ca2
AC
110 -----------------
111 -- Create_Task --
112 -----------------
84481f76 113
15ce9ca2
AC
114 procedure Create_Task
115 (T : Task_Id;
116 Wrapper : System.Address;
117 Stack_Size : System.Parameters.Size_Type;
118 Priority : System.Any_Priority;
119 Succeeded : out Boolean)
bcea76b6 120 is
15ce9ca2
AC
121 begin
122 Succeeded := False;
123 end Create_Task;
124
125 ----------------
126 -- Enter_Task --
127 ----------------
128
129 procedure Enter_Task (Self_ID : Task_Id) is
84481f76
RK
130 begin
131 null;
15ce9ca2 132 end Enter_Task;
84481f76 133
15ce9ca2
AC
134 ---------------
135 -- Exit_Task --
136 ---------------
137
138 procedure Exit_Task is
84481f76
RK
139 begin
140 null;
15ce9ca2 141 end Exit_Task;
84481f76 142
b497b460
JR
143 --------------
144 -- Finalize --
145 --------------
146
147 procedure Finalize (S : in out Suspension_Object) is
148 begin
149 null;
150 end Finalize;
151
84481f76
RK
152 -------------------
153 -- Finalize_Lock --
154 -------------------
155
d90e94c7 156 procedure Finalize_Lock (L : not null access Lock) is
84481f76
RK
157 begin
158 null;
159 end Finalize_Lock;
160
d90e94c7 161 procedure Finalize_Lock (L : not null access RTS_Lock) is
84481f76
RK
162 begin
163 null;
164 end Finalize_Lock;
165
15ce9ca2
AC
166 ------------------
167 -- Finalize_TCB --
168 ------------------
84481f76 169
15ce9ca2 170 procedure Finalize_TCB (T : Task_Id) is
84481f76
RK
171 begin
172 null;
15ce9ca2 173 end Finalize_TCB;
84481f76 174
15ce9ca2
AC
175 ------------------
176 -- Get_Priority --
177 ------------------
178
179 function Get_Priority (T : Task_Id) return System.Any_Priority is
84481f76 180 begin
15ce9ca2
AC
181 return 0;
182 end Get_Priority;
84481f76 183
15ce9ca2
AC
184 --------------------
185 -- Get_Thread_Id --
186 --------------------
84481f76 187
15ce9ca2 188 function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is
84481f76 189 begin
15ce9ca2
AC
190 return OSI.Thread_Id (T.Common.LL.Thread);
191 end Get_Thread_Id;
84481f76 192
15ce9ca2
AC
193 ----------------
194 -- Initialize --
195 ----------------
84481f76 196
15ce9ca2 197 procedure Initialize (Environment_Task : Task_Id) is
3b91d88e 198 No_Tasking : Boolean;
84481f76 199 begin
e64e5f74 200 raise Program_Error with "tasking not implemented on this configuration";
15ce9ca2 201 end Initialize;
84481f76 202
b497b460
JR
203 procedure Initialize (S : in out Suspension_Object) is
204 begin
205 null;
206 end Initialize;
207
15ce9ca2
AC
208 ---------------------
209 -- Initialize_Lock --
210 ---------------------
211
212 procedure Initialize_Lock
213 (Prio : System.Any_Priority;
d90e94c7 214 L : not null access Lock)
15ce9ca2 215 is
84481f76
RK
216 begin
217 null;
15ce9ca2 218 end Initialize_Lock;
84481f76 219
d90e94c7
JM
220 procedure Initialize_Lock
221 (L : not null access RTS_Lock; Level : Lock_Level) is
84481f76
RK
222 begin
223 null;
15ce9ca2 224 end Initialize_Lock;
84481f76 225
15ce9ca2
AC
226 --------------------
227 -- Initialize_TCB --
228 --------------------
84481f76 229
15ce9ca2 230 procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
84481f76 231 begin
15ce9ca2
AC
232 Succeeded := False;
233 end Initialize_TCB;
84481f76 234
15ce9ca2
AC
235 -------------------
236 -- Is_Valid_Task --
237 -------------------
84481f76 238
15ce9ca2 239 function Is_Valid_Task return Boolean is
84481f76 240 begin
15ce9ca2
AC
241 return False;
242 end Is_Valid_Task;
84481f76 243
15ce9ca2
AC
244 --------------
245 -- Lock_RTS --
246 --------------
84481f76 247
15ce9ca2 248 procedure Lock_RTS is
84481f76 249 begin
07fc65c4 250 null;
15ce9ca2 251 end Lock_RTS;
84481f76
RK
252
253 ---------------------
254 -- Monotonic_Clock --
255 ---------------------
256
257 function Monotonic_Clock return Duration is
258 begin
259 return 0.0;
260 end Monotonic_Clock;
261
15ce9ca2
AC
262 ---------------
263 -- Read_Lock --
264 ---------------
fbf5a39b 265
d90e94c7 266 procedure Read_Lock
dae22b53
AC
267 (L : not null access Lock;
268 Ceiling_Violation : out Boolean)
269 is
fbf5a39b 270 begin
15ce9ca2
AC
271 Ceiling_Violation := False;
272 end Read_Lock;
fbf5a39b
AC
273
274 -----------------------------
275 -- Register_Foreign_Thread --
276 -----------------------------
277
b5e792e2 278 function Register_Foreign_Thread return Task_Id is
fbf5a39b
AC
279 begin
280 return null;
281 end Register_Foreign_Thread;
282
15ce9ca2
AC
283 -----------------
284 -- Resume_Task --
285 -----------------
84481f76 286
15ce9ca2
AC
287 function Resume_Task
288 (T : ST.Task_Id;
289 Thread_Self : OSI.Thread_Id) return Boolean
290 is
84481f76 291 begin
15ce9ca2
AC
292 return False;
293 end Resume_Task;
84481f76 294
15ce9ca2
AC
295 -------------------
296 -- RT_Resolution --
297 -------------------
84481f76 298
15ce9ca2 299 function RT_Resolution return Duration is
84481f76 300 begin
15ce9ca2
AC
301 return 10#1.0#E-6;
302 end RT_Resolution;
303
304 ----------
305 -- Self --
306 ----------
307
308 function Self return Task_Id is
309 begin
310 return Null_Task;
311 end Self;
84481f76 312
dae22b53
AC
313 -----------------
314 -- Set_Ceiling --
315 -----------------
316
317 procedure Set_Ceiling
318 (L : not null access Lock;
319 Prio : System.Any_Priority)
320 is
321 begin
322 null;
323 end Set_Ceiling;
324
b497b460
JR
325 ---------------
326 -- Set_False --
327 ---------------
328
329 procedure Set_False (S : in out Suspension_Object) is
330 begin
331 null;
332 end Set_False;
333
84481f76 334 ------------------
15ce9ca2 335 -- Set_Priority --
84481f76
RK
336 ------------------
337
15ce9ca2
AC
338 procedure Set_Priority
339 (T : Task_Id;
340 Prio : System.Any_Priority;
341 Loss_Of_Inheritance : Boolean := False)
342 is
84481f76
RK
343 begin
344 null;
15ce9ca2 345 end Set_Priority;
84481f76 346
c37cbdc3
AC
347 -----------------------
348 -- Set_Task_Affinity --
349 -----------------------
350
351 procedure Set_Task_Affinity (T : ST.Task_Id) is
352 begin
353 null;
354 end Set_Task_Affinity;
355
b497b460
JR
356 --------------
357 -- Set_True --
358 --------------
359
360 procedure Set_True (S : in out Suspension_Object) is
361 begin
362 null;
363 end Set_True;
364
15ce9ca2
AC
365 -----------
366 -- Sleep --
367 -----------
84481f76 368
d90e94c7 369 procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is
84481f76
RK
370 begin
371 null;
15ce9ca2 372 end Sleep;
84481f76 373
15ce9ca2
AC
374 -----------------
375 -- Stack_Guard --
376 -----------------
84481f76 377
15ce9ca2 378 procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is
84481f76
RK
379 begin
380 null;
15ce9ca2 381 end Stack_Guard;
84481f76 382
15ce9ca2
AC
383 ------------------
384 -- Suspend_Task --
385 ------------------
84481f76 386
15ce9ca2
AC
387 function Suspend_Task
388 (T : ST.Task_Id;
389 Thread_Self : OSI.Thread_Id) return Boolean
390 is
84481f76 391 begin
15ce9ca2
AC
392 return False;
393 end Suspend_Task;
84481f76 394
c9b9ec14
JG
395 --------------------
396 -- Stop_All_Tasks --
397 --------------------
398
399 procedure Stop_All_Tasks is
400 begin
401 null;
402 end Stop_All_Tasks;
403
ed18d858
JG
404 ---------------
405 -- Stop_Task --
406 ---------------
407
408 function Stop_Task (T : ST.Task_Id) return Boolean is
409 pragma Unreferenced (T);
410 begin
411 return False;
412 end Stop_Task;
413
b497b460
JR
414 ------------------------
415 -- Suspend_Until_True --
416 ------------------------
417
418 procedure Suspend_Until_True (S : in out Suspension_Object) is
419 begin
420 null;
421 end Suspend_Until_True;
422
15ce9ca2
AC
423 -----------------
424 -- Timed_Delay --
425 -----------------
84481f76 426
15ce9ca2
AC
427 procedure Timed_Delay
428 (Self_ID : Task_Id;
429 Time : Duration;
430 Mode : ST.Delay_Modes)
431 is
84481f76 432 begin
15ce9ca2
AC
433 null;
434 end Timed_Delay;
84481f76 435
15ce9ca2
AC
436 -----------------
437 -- Timed_Sleep --
438 -----------------
84481f76 439
15ce9ca2
AC
440 procedure Timed_Sleep
441 (Self_ID : Task_Id;
442 Time : Duration;
443 Mode : ST.Delay_Modes;
444 Reason : System.Tasking.Task_States;
445 Timedout : out Boolean;
446 Yielded : out Boolean)
447 is
84481f76 448 begin
15ce9ca2
AC
449 Timedout := False;
450 Yielded := False;
451 end Timed_Sleep;
84481f76 452
15ce9ca2
AC
453 ------------
454 -- Unlock --
455 ------------
84481f76 456
d90e94c7 457 procedure Unlock (L : not null access Lock) is
84481f76 458 begin
15ce9ca2
AC
459 null;
460 end Unlock;
84481f76 461
d90e94c7 462 procedure Unlock
dae22b53
AC
463 (L : not null access RTS_Lock;
464 Global_Lock : Boolean := False)
465 is
15ce9ca2
AC
466 begin
467 null;
468 end Unlock;
84481f76 469
15ce9ca2 470 procedure Unlock (T : Task_Id) is
84481f76
RK
471 begin
472 null;
15ce9ca2 473 end Unlock;
84481f76 474
07fc65c4
GB
475 ----------------
476 -- Unlock_RTS --
477 ----------------
84481f76 478
07fc65c4 479 procedure Unlock_RTS is
84481f76
RK
480 begin
481 null;
07fc65c4 482 end Unlock_RTS;
15ce9ca2
AC
483 ------------
484 -- Wakeup --
485 ------------
84481f76 486
15ce9ca2 487 procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is
84481f76 488 begin
15ce9ca2
AC
489 null;
490 end Wakeup;
84481f76 491
15ce9ca2
AC
492 ----------------
493 -- Write_Lock --
494 ----------------
84481f76 495
d90e94c7 496 procedure Write_Lock
dae22b53
AC
497 (L : not null access Lock;
498 Ceiling_Violation : out Boolean)
499 is
84481f76 500 begin
15ce9ca2
AC
501 Ceiling_Violation := False;
502 end Write_Lock;
84481f76 503
15ce9ca2 504 procedure Write_Lock
d90e94c7 505 (L : not null access RTS_Lock;
15ce9ca2
AC
506 Global_Lock : Boolean := False)
507 is
508 begin
509 null;
510 end Write_Lock;
84481f76 511
15ce9ca2 512 procedure Write_Lock (T : Task_Id) is
84481f76
RK
513 begin
514 null;
15ce9ca2 515 end Write_Lock;
84481f76 516
15ce9ca2
AC
517 -----------
518 -- Yield --
519 -----------
520
521 procedure Yield (Do_Yield : Boolean := True) is
522 begin
523 null;
524 end Yield;
84481f76 525
84481f76 526end System.Task_Primitives.Operations;