OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [ada/] [s-taprop-dummy.adb] - Blame information for rev 728

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 706 jeremybenn
------------------------------------------------------------------------------
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-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
------------------------------------------------------------------------------
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
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.
40
 
41
package body System.Task_Primitives.Operations is
42
 
43
   use System.Tasking;
44
   use System.Parameters;
45
 
46
   pragma Warnings (Off);
47
   --  Turn off warnings since so many unreferenced parameters
48
 
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
 
56
   ----------------
57
   -- Abort_Task --
58
   ----------------
59
 
60
   procedure Abort_Task (T : Task_Id) is
61
   begin
62
      null;
63
   end Abort_Task;
64
 
65
   ----------------
66
   -- Check_Exit --
67
   ----------------
68
 
69
   function Check_Exit (Self_ID : ST.Task_Id) return Boolean is
70
   begin
71
      return True;
72
   end Check_Exit;
73
 
74
   --------------------
75
   -- Check_No_Locks --
76
   --------------------
77
 
78
   function Check_No_Locks (Self_ID : ST.Task_Id) return Boolean is
79
   begin
80
      return True;
81
   end Check_No_Locks;
82
 
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
 
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
 
101
   ----------------------
102
   -- Environment_Task --
103
   ----------------------
104
 
105
   function Environment_Task return Task_Id is
106
   begin
107
      return null;
108
   end Environment_Task;
109
 
110
   -----------------
111
   -- Create_Task --
112
   -----------------
113
 
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)
120
   is
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
130
   begin
131
      null;
132
   end Enter_Task;
133
 
134
   ---------------
135
   -- Exit_Task --
136
   ---------------
137
 
138
   procedure Exit_Task is
139
   begin
140
      null;
141
   end Exit_Task;
142
 
143
   --------------
144
   -- Finalize --
145
   --------------
146
 
147
   procedure Finalize (S : in out Suspension_Object) is
148
   begin
149
      null;
150
   end Finalize;
151
 
152
   -------------------
153
   -- Finalize_Lock --
154
   -------------------
155
 
156
   procedure Finalize_Lock (L : not null access Lock) is
157
   begin
158
      null;
159
   end Finalize_Lock;
160
 
161
   procedure Finalize_Lock (L : not null access RTS_Lock) is
162
   begin
163
      null;
164
   end Finalize_Lock;
165
 
166
   ------------------
167
   -- Finalize_TCB --
168
   ------------------
169
 
170
   procedure Finalize_TCB (T : Task_Id) is
171
   begin
172
      null;
173
   end Finalize_TCB;
174
 
175
   ------------------
176
   -- Get_Priority --
177
   ------------------
178
 
179
   function Get_Priority (T : Task_Id) return System.Any_Priority is
180
   begin
181
      return 0;
182
   end Get_Priority;
183
 
184
   --------------------
185
   -- Get_Thread_Id  --
186
   --------------------
187
 
188
   function Get_Thread_Id (T : ST.Task_Id) return OSI.Thread_Id is
189
   begin
190
      return OSI.Thread_Id (T.Common.LL.Thread);
191
   end Get_Thread_Id;
192
 
193
   ----------------
194
   -- Initialize --
195
   ----------------
196
 
197
   procedure Initialize (Environment_Task : Task_Id) is
198
      No_Tasking : Boolean;
199
   begin
200
      raise Program_Error with "tasking not implemented on this configuration";
201
   end Initialize;
202
 
203
   procedure Initialize (S : in out Suspension_Object) is
204
   begin
205
      null;
206
   end Initialize;
207
 
208
   ---------------------
209
   -- Initialize_Lock --
210
   ---------------------
211
 
212
   procedure Initialize_Lock
213
     (Prio : System.Any_Priority;
214
      L    : not null access Lock)
215
   is
216
   begin
217
      null;
218
   end Initialize_Lock;
219
 
220
   procedure Initialize_Lock
221
     (L : not null access RTS_Lock; Level : Lock_Level) is
222
   begin
223
      null;
224
   end Initialize_Lock;
225
 
226
   --------------------
227
   -- Initialize_TCB --
228
   --------------------
229
 
230
   procedure Initialize_TCB (Self_ID : Task_Id; Succeeded : out Boolean) is
231
   begin
232
      Succeeded := False;
233
   end Initialize_TCB;
234
 
235
   -------------------
236
   -- Is_Valid_Task --
237
   -------------------
238
 
239
   function Is_Valid_Task return Boolean is
240
   begin
241
      return False;
242
   end Is_Valid_Task;
243
 
244
   --------------
245
   -- Lock_RTS --
246
   --------------
247
 
248
   procedure Lock_RTS is
249
   begin
250
      null;
251
   end Lock_RTS;
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
 
262
   ---------------
263
   -- Read_Lock --
264
   ---------------
265
 
266
   procedure Read_Lock
267
     (L                 : not null access Lock;
268
      Ceiling_Violation : out Boolean)
269
   is
270
   begin
271
      Ceiling_Violation := False;
272
   end Read_Lock;
273
 
274
   -----------------------------
275
   -- Register_Foreign_Thread --
276
   -----------------------------
277
 
278
   function Register_Foreign_Thread return Task_Id is
279
   begin
280
      return null;
281
   end Register_Foreign_Thread;
282
 
283
   -----------------
284
   -- Resume_Task --
285
   -----------------
286
 
287
   function Resume_Task
288
     (T           : ST.Task_Id;
289
      Thread_Self : OSI.Thread_Id) return Boolean
290
   is
291
   begin
292
      return False;
293
   end Resume_Task;
294
 
295
   -------------------
296
   -- RT_Resolution --
297
   -------------------
298
 
299
   function RT_Resolution return Duration is
300
   begin
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;
312
 
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
 
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
 
334
   ------------------
335
   -- Set_Priority --
336
   ------------------
337
 
338
   procedure Set_Priority
339
     (T                   : Task_Id;
340
      Prio                : System.Any_Priority;
341
      Loss_Of_Inheritance : Boolean := False)
342
   is
343
   begin
344
      null;
345
   end Set_Priority;
346
 
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
 
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
 
365
   -----------
366
   -- Sleep --
367
   -----------
368
 
369
   procedure Sleep (Self_ID : Task_Id; Reason : System.Tasking.Task_States) is
370
   begin
371
      null;
372
   end Sleep;
373
 
374
   -----------------
375
   -- Stack_Guard --
376
   -----------------
377
 
378
   procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is
379
   begin
380
      null;
381
   end Stack_Guard;
382
 
383
   ------------------
384
   -- Suspend_Task --
385
   ------------------
386
 
387
   function Suspend_Task
388
     (T           : ST.Task_Id;
389
      Thread_Self : OSI.Thread_Id) return Boolean
390
   is
391
   begin
392
      return False;
393
   end Suspend_Task;
394
 
395
   --------------------
396
   -- Stop_All_Tasks --
397
   --------------------
398
 
399
   procedure Stop_All_Tasks is
400
   begin
401
      null;
402
   end Stop_All_Tasks;
403
 
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
 
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
 
423
   -----------------
424
   -- Timed_Delay --
425
   -----------------
426
 
427
   procedure Timed_Delay
428
     (Self_ID : Task_Id;
429
      Time    : Duration;
430
      Mode    : ST.Delay_Modes)
431
   is
432
   begin
433
      null;
434
   end Timed_Delay;
435
 
436
   -----------------
437
   -- Timed_Sleep --
438
   -----------------
439
 
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
448
   begin
449
      Timedout := False;
450
      Yielded := False;
451
   end Timed_Sleep;
452
 
453
   ------------
454
   -- Unlock --
455
   ------------
456
 
457
   procedure Unlock (L : not null access Lock) is
458
   begin
459
      null;
460
   end Unlock;
461
 
462
   procedure Unlock
463
     (L           : not null access RTS_Lock;
464
      Global_Lock : Boolean := False)
465
   is
466
   begin
467
      null;
468
   end Unlock;
469
 
470
   procedure Unlock (T : Task_Id) is
471
   begin
472
      null;
473
   end Unlock;
474
 
475
   ----------------
476
   -- Unlock_RTS --
477
   ----------------
478
 
479
   procedure Unlock_RTS is
480
   begin
481
      null;
482
   end Unlock_RTS;
483
   ------------
484
   -- Wakeup --
485
   ------------
486
 
487
   procedure Wakeup (T : Task_Id; Reason : System.Tasking.Task_States) is
488
   begin
489
      null;
490
   end Wakeup;
491
 
492
   ----------------
493
   -- Write_Lock --
494
   ----------------
495
 
496
   procedure Write_Lock
497
     (L                 : not null access Lock;
498
      Ceiling_Violation : out Boolean)
499
   is
500
   begin
501
      Ceiling_Violation := False;
502
   end Write_Lock;
503
 
504
   procedure Write_Lock
505
     (L           : not null access RTS_Lock;
506
      Global_Lock : Boolean := False)
507
   is
508
   begin
509
      null;
510
   end Write_Lock;
511
 
512
   procedure Write_Lock (T : Task_Id) is
513
   begin
514
      null;
515
   end Write_Lock;
516
 
517
   -----------
518
   -- Yield --
519
   -----------
520
 
521
   procedure Yield (Do_Yield : Boolean := True) is
522
   begin
523
      null;
524
   end Yield;
525
 
526
end System.Task_Primitives.Operations;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.