Debian Codegraph @

gcc/ada/libgnarl/s-taprop__dummy.adb

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