hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS
[official-gcc.git] / gcc / ada / libgnarl / s-tarest.adb
blob98ceb8f852ac5ac81b66887ecc2cf103a1a99799
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . T A S K I N G . R E S T R I C T E D . S T A G E S --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1999-2024, 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 pragma Style_Checks (All_Checks);
33 -- Turn off subprogram alpha order check, since we group soft link
34 -- bodies and also separate off subprograms for restricted GNARLI.
36 -- This is a simplified version of the System.Tasking.Stages package,
37 -- intended to be used in a restricted run time.
39 -- This package represents the high level tasking interface used by the
40 -- compiler to expand Ada 95 tasking constructs into simpler run time calls.
42 with Ada.Exceptions;
44 with System.Task_Primitives.Operations;
45 with System.Soft_Links.Tasking;
47 with System.Soft_Links;
48 -- Used for the non-tasking routines (*_NT) that refer to global data. They
49 -- are needed here before the tasking run time has been elaborated. used for
50 -- Create_TSD This package also provides initialization routines for task
51 -- specific data. The GNARL must call these to be sure that all non-tasking
52 -- Ada constructs will work.
54 package body System.Tasking.Restricted.Stages is
56 package STPO renames System.Task_Primitives.Operations;
57 package SSL renames System.Soft_Links;
59 use Ada.Exceptions;
61 use Task_Primitives.Operations;
63 Tasks_Activation_Chain : Task_Id;
64 -- Chain of all the tasks to activate
66 Global_Task_Lock : aliased System.Task_Primitives.RTS_Lock;
67 -- This is a global lock; it is used to execute in mutual exclusion
68 -- from all other tasks. It is only used by Task_Lock and Task_Unlock.
70 -----------------------------------------------------------------
71 -- Tasking versions of services needed by non-tasking programs --
72 -----------------------------------------------------------------
74 function Get_Current_Excep return SSL.EOA;
75 -- Task-safe version of SSL.Get_Current_Excep
77 procedure Task_Lock;
78 -- Locks out other tasks. Preceding a section of code by Task_Lock and
79 -- following it by Task_Unlock creates a critical region. This is used
80 -- for ensuring that a region of non-tasking code (such as code used to
81 -- allocate memory) is tasking safe. Note that it is valid for calls to
82 -- Task_Lock/Task_Unlock to be nested, and this must work properly, i.e.
83 -- only the corresponding outer level Task_Unlock will actually unlock.
85 procedure Task_Unlock;
86 -- Releases lock previously set by call to Task_Lock. In the nested case,
87 -- all nested locks must be released before other tasks competing for the
88 -- tasking lock are released.
90 -----------------------
91 -- Local Subprograms --
92 -----------------------
94 procedure Task_Wrapper (Self_ID : Task_Id);
95 -- This is the procedure that is called by the GNULL from the
96 -- new context when a task is created. It waits for activation
97 -- and then calls the task body procedure. When the task body
98 -- procedure completes, it terminates the task.
100 procedure Terminate_Task (Self_ID : Task_Id);
101 -- Terminate the calling task.
102 -- This should only be called by the Task_Wrapper procedure.
104 procedure Create_Restricted_Task
105 (Priority : Integer;
106 Stack_Address : System.Address;
107 Stack_Size : System.Parameters.Size_Type;
108 Sec_Stack_Address : System.Secondary_Stack.SS_Stack_Ptr;
109 Sec_Stack_Size : System.Parameters.Size_Type;
110 Task_Info : System.Task_Info.Task_Info_Type;
111 CPU : Integer;
112 State : Task_Procedure_Access;
113 Discriminants : System.Address;
114 Elaborated : Access_Boolean;
115 Task_Image : String;
116 Created_Task : Task_Id);
117 -- Code shared between Create_Restricted_Task (the concurrent version) and
118 -- Create_Restricted_Task_Sequential. See comment of the former in the
119 -- specification of this package.
121 procedure Activate_Tasks (Chain : Task_Id);
122 -- Activate the list of tasks started by Chain
124 procedure Init_RTS;
125 -- This procedure performs the initialization of the GNARL.
126 -- It consists of initializing the environment task, global locks, and
127 -- installing tasking versions of certain operations used by the compiler.
128 -- Init_RTS is called during elaboration.
130 -----------------------
131 -- Get_Current_Excep --
132 -----------------------
134 function Get_Current_Excep return SSL.EOA is
135 begin
136 return STPO.Self.Common.Compiler_Data.Current_Excep'Access;
137 end Get_Current_Excep;
139 ---------------
140 -- Task_Lock --
141 ---------------
143 procedure Task_Lock is
144 Self_ID : constant Task_Id := STPO.Self;
146 begin
147 Self_ID.Common.Global_Task_Lock_Nesting :=
148 Self_ID.Common.Global_Task_Lock_Nesting + 1;
150 if Self_ID.Common.Global_Task_Lock_Nesting = 1 then
151 STPO.Write_Lock (Global_Task_Lock'Access);
152 end if;
153 end Task_Lock;
155 -----------------
156 -- Task_Unlock --
157 -----------------
159 procedure Task_Unlock is
160 Self_ID : constant Task_Id := STPO.Self;
162 begin
163 pragma Assert (Self_ID.Common.Global_Task_Lock_Nesting > 0);
164 Self_ID.Common.Global_Task_Lock_Nesting :=
165 Self_ID.Common.Global_Task_Lock_Nesting - 1;
167 if Self_ID.Common.Global_Task_Lock_Nesting = 0 then
168 STPO.Unlock (Global_Task_Lock'Access);
169 end if;
170 end Task_Unlock;
172 ------------------
173 -- Task_Wrapper --
174 ------------------
176 -- The task wrapper is a procedure that is called first for each task
177 -- task body, and which in turn calls the compiler-generated task body
178 -- procedure. The wrapper's main job is to do initialization for the task.
180 -- The variable ID in the task wrapper is used to implement the Self
181 -- function on targets where there is a fast way to find the stack base
182 -- of the current thread, since it should be at a fixed offset from the
183 -- stack base.
185 procedure Task_Wrapper (Self_ID : Task_Id) is
186 ID : Task_Id := Self_ID;
187 pragma Volatile (ID);
188 pragma Warnings (Off, ID);
189 -- Variable used on some targets to implement a fast self. We turn off
190 -- warnings because a stand alone volatile constant has to be imported,
191 -- so we don't want warnings about ID not being referenced, and volatile
192 -- having no effect.
194 -- DO NOT delete ID. As noted, it is needed on some targets.
196 Cause : Cause_Of_Termination := Normal;
197 -- Indicates the reason why this task terminates. Normal corresponds to
198 -- a task terminating due to completing the last statement of its body.
199 -- If the task terminates because of an exception raised by the
200 -- execution of its task body, then Cause is set to Unhandled_Exception.
201 -- Aborts are not allowed in the restricted profile to which this file
202 -- belongs.
204 EO : Exception_Occurrence;
205 -- If the task terminates because of an exception raised by the
206 -- execution of its task body, then EO will contain the associated
207 -- exception occurrence. Otherwise, it will contain Null_Occurrence.
209 begin
210 -- Initialize low-level TCB components, that cannot be initialized by
211 -- the creator.
213 Enter_Task (Self_ID);
215 -- Call the task body procedure
217 begin
218 -- We are separating the following portion of the code in order to
219 -- place the exception handlers in a different block. In this way we
220 -- do not call Set_Jmpbuf_Address (which needs Self) before we set
221 -- Self in Enter_Task.
223 -- Note that in the case of Ravenscar HI-E where there are no
224 -- exception handlers, the exception handler is suppressed.
226 -- Call the task body procedure
228 Self_ID.Common.Task_Entry_Point (Self_ID.Common.Task_Arg);
230 -- Normal task termination
232 Cause := Normal;
233 Save_Occurrence (EO, Ada.Exceptions.Null_Occurrence);
235 exception
236 when E : others =>
238 -- Task terminating because of an unhandled exception
240 Cause := Unhandled_Exception;
241 Save_Occurrence (EO, E);
242 end;
244 -- Look for a fall-back handler
246 -- This package is part of the restricted run time which supports
247 -- neither task hierarchies (No_Task_Hierarchy) nor specific task
248 -- termination handlers (No_Specific_Termination_Handlers).
250 -- As specified in ARM C.7.3 par. 9/2, "the fall-back handler applies
251 -- only to the dependent tasks of the task". Hence, if the terminating
252 -- tasks (Self_ID) had a fall-back handler, it would not apply to
253 -- itself. This code is always executed by a task whose master is the
254 -- environment task (the task termination code for the environment task
255 -- is executed by SSL.Task_Termination_Handler), so the fall-back
256 -- handler to execute for this task can only be defined by its parent
257 -- (there is no grandparent).
259 declare
260 TH : Termination_Handler := null;
262 begin
263 Write_Lock (Self_ID.Common.Parent);
265 TH := Self_ID.Common.Parent.Common.Fall_Back_Handler;
267 Unlock (Self_ID.Common.Parent);
269 -- Execute the task termination handler if we found it
271 if TH /= null then
272 TH.all (Cause, Self_ID, EO);
273 end if;
274 end;
276 Terminate_Task (Self_ID);
277 end Task_Wrapper;
279 -----------------------
280 -- Restricted GNARLI --
281 -----------------------
283 -----------------------------------
284 -- Activate_All_Tasks_Sequential --
285 -----------------------------------
287 procedure Activate_All_Tasks_Sequential is
288 begin
289 pragma Assert (Partition_Elaboration_Policy = 'S');
291 Activate_Tasks (Tasks_Activation_Chain);
292 Tasks_Activation_Chain := Null_Task;
293 end Activate_All_Tasks_Sequential;
295 -------------------------------
296 -- Activate_Restricted_Tasks --
297 -------------------------------
299 procedure Activate_Restricted_Tasks
300 (Chain_Access : Activation_Chain_Access) is
301 begin
302 if Partition_Elaboration_Policy = 'S' then
304 -- In sequential elaboration policy, the chain must be empty. This
305 -- procedure can be called if the unit has been compiled without
306 -- partition elaboration policy, but the partition has a sequential
307 -- elaboration policy.
309 pragma Assert (Chain_Access.T_ID = Null_Task);
310 null;
311 else
312 Activate_Tasks (Chain_Access.T_ID);
313 Chain_Access.T_ID := Null_Task;
314 end if;
315 end Activate_Restricted_Tasks;
317 --------------------
318 -- Activate_Tasks --
319 --------------------
321 -- Note that locks of activator and activated task are both locked here.
322 -- This is necessary because C.State and Self.Wait_Count have to be
323 -- synchronized. This is safe from deadlock because the activator is always
324 -- created before the activated task. That satisfies our
325 -- in-order-of-creation ATCB locking policy.
327 procedure Activate_Tasks (Chain : Task_Id) is
328 Self_ID : constant Task_Id := STPO.Self;
329 C : Task_Id;
330 Activate_Prio : System.Any_Priority;
331 Success : Boolean;
333 begin
334 pragma Assert (Self_ID = Environment_Task);
335 pragma Assert (Self_ID.Common.Wait_Count = 0);
337 -- Lock self, to prevent activated tasks from racing ahead before we
338 -- finish activating the chain.
340 Write_Lock (Self_ID);
342 -- Activate all the tasks in the chain. Creation of the thread of
343 -- control was deferred until activation. So create it now.
345 C := Chain;
346 while C /= null loop
347 if C.Common.State /= Terminated then
348 pragma Assert (C.Common.State = Unactivated);
350 Write_Lock (C);
352 Activate_Prio :=
353 (if C.Common.Base_Priority < Get_Priority (Self_ID)
354 then Get_Priority (Self_ID)
355 else C.Common.Base_Priority);
357 STPO.Create_Task
358 (C, Task_Wrapper'Address,
359 Parameters.Size_Type
360 (C.Common.Compiler_Data.Pri_Stack_Info.Size),
361 Activate_Prio, Success);
363 Self_ID.Common.Wait_Count := Self_ID.Common.Wait_Count + 1;
365 if Success then
366 C.Common.State := Runnable;
367 else
368 raise Program_Error;
369 end if;
371 Unlock (C);
372 end if;
374 C := C.Common.Activation_Link;
375 end loop;
377 Self_ID.Common.State := Activator_Sleep;
379 -- Wait for the activated tasks to complete activation. It is unsafe to
380 -- abort any of these tasks until the count goes to zero.
382 loop
383 exit when Self_ID.Common.Wait_Count = 0;
384 Sleep (Self_ID, Activator_Sleep);
385 end loop;
387 Self_ID.Common.State := Runnable;
388 Unlock (Self_ID);
389 end Activate_Tasks;
391 ------------------------------------
392 -- Complete_Restricted_Activation --
393 ------------------------------------
395 -- As in several other places, the locks of the activator and activated
396 -- task are both locked here. This follows our deadlock prevention lock
397 -- ordering policy, since the activated task must be created after the
398 -- activator.
400 procedure Complete_Restricted_Activation is
401 Self_ID : constant Task_Id := STPO.Self;
402 Activator : constant Task_Id := Self_ID.Common.Activator;
404 begin
405 Write_Lock (Activator);
406 Write_Lock (Self_ID);
408 -- Remove dangling reference to Activator, since a task may outlive its
409 -- activator.
411 Self_ID.Common.Activator := null;
413 -- Wake up the activator, if it is waiting for a chain of tasks to
414 -- activate, and we are the last in the chain to complete activation
416 if Activator.Common.State = Activator_Sleep then
417 Activator.Common.Wait_Count := Activator.Common.Wait_Count - 1;
419 if Activator.Common.Wait_Count = 0 then
420 Wakeup (Activator, Activator_Sleep);
421 end if;
422 end if;
424 Unlock (Self_ID);
425 Unlock (Activator);
427 -- After the activation, active priority should be the same as base
428 -- priority. We must unlock the Activator first, though, since it should
429 -- not wait if we have lower priority.
431 if Get_Priority (Self_ID) /= Self_ID.Common.Base_Priority then
432 Set_Priority (Self_ID, Self_ID.Common.Base_Priority);
433 end if;
434 end Complete_Restricted_Activation;
436 ------------------------------
437 -- Complete_Restricted_Task --
438 ------------------------------
440 procedure Complete_Restricted_Task is
441 begin
442 STPO.Self.Common.State := Terminated;
443 end Complete_Restricted_Task;
445 ----------------------------
446 -- Create_Restricted_Task --
447 ----------------------------
449 procedure Create_Restricted_Task
450 (Priority : Integer;
451 Stack_Address : System.Address;
452 Stack_Size : System.Parameters.Size_Type;
453 Sec_Stack_Address : System.Secondary_Stack.SS_Stack_Ptr;
454 Sec_Stack_Size : System.Parameters.Size_Type;
455 Task_Info : System.Task_Info.Task_Info_Type;
456 CPU : Integer;
457 State : Task_Procedure_Access;
458 Discriminants : System.Address;
459 Elaborated : Access_Boolean;
460 Task_Image : String;
461 Created_Task : Task_Id)
463 Self_ID : constant Task_Id := STPO.Self;
464 Base_Priority : System.Any_Priority;
465 Base_CPU : System.Multiprocessors.CPU_Range;
466 Success : Boolean;
467 Len : Integer;
469 begin
470 -- Stack is not preallocated on this target, so that Stack_Address must
471 -- be null.
473 pragma Assert (Stack_Address = Null_Address);
475 Base_Priority :=
476 (if Priority = Unspecified_Priority
477 then Self_ID.Common.Base_Priority
478 else System.Any_Priority (Priority));
480 -- Legal values of CPU are the special Unspecified_CPU value which is
481 -- inserted by the compiler for tasks without CPU aspect, and those in
482 -- the range of CPU_Range but no greater than Number_Of_CPUs. Otherwise
483 -- the task is defined to have failed, and it becomes a completed task
484 -- (RM D.16(14/3)).
486 if CPU /= Unspecified_CPU
487 and then (CPU < Integer (System.Multiprocessors.CPU_Range'First)
488 or else CPU > Integer (System.Multiprocessors.Number_Of_CPUs))
489 then
490 raise Tasking_Error with "CPU not in range";
492 -- Normal CPU affinity
493 else
494 -- When the application code says nothing about the task affinity
495 -- (task without CPU aspect) then the compiler inserts the
496 -- Unspecified_CPU value which indicates to the run-time library that
497 -- the task will activate and execute on the same processor as its
498 -- activating task if the activating task is assigned a processor
499 -- (RM D.16(14/3)).
501 Base_CPU :=
502 (if CPU = Unspecified_CPU
503 then Self_ID.Common.Base_CPU
504 else System.Multiprocessors.CPU_Range (CPU));
505 end if;
507 Write_Lock (Self_ID);
509 -- With no task hierarchy, the parent of all non-Environment tasks that
510 -- are created must be the Environment task. Dispatching domains are
511 -- not allowed in Ravenscar, so the dispatching domain parameter will
512 -- always be null.
514 Initialize_ATCB
515 (Self_ID, State, Discriminants, Self_ID, Elaborated, Base_Priority,
516 Base_CPU, null, Task_Info, Stack_Size, Created_Task, Success);
518 -- If we do our job right then there should never be any failures, which
519 -- was probably said about the Titanic; so just to be safe, let's retain
520 -- this code for now
522 if not Success then
523 Unlock (Self_ID);
524 raise Program_Error;
525 end if;
527 -- Only the first element of the Entry_Calls array is used when the
528 -- Ravenscar Profile is active, as no asynchronous transfer of control
529 -- is allowed.
531 Created_Task.Entry_Calls (Created_Task.Entry_Calls'First) :=
532 (Self => Created_Task,
533 Level => Created_Task.Entry_Calls'First,
534 others => <>);
536 -- Set task name
538 Len :=
539 Integer'Min (Created_Task.Common.Task_Image'Length, Task_Image'Length);
540 Created_Task.Common.Task_Image_Len := Len;
541 Created_Task.Common.Task_Image (1 .. Len) :=
542 Task_Image (Task_Image'First .. Task_Image'First + Len - 1);
544 Unlock (Self_ID);
546 -- Create TSD as early as possible in the creation of a task, since
547 -- it may be used by the operation of Ada code within the task. If the
548 -- compiler has not allocated a secondary stack, a stack will be
549 -- allocated fromt the binder generated pool.
551 SSL.Create_TSD
552 (Created_Task.Common.Compiler_Data,
553 Sec_Stack_Address,
554 Sec_Stack_Size);
555 end Create_Restricted_Task;
557 procedure Create_Restricted_Task
558 (Priority : Integer;
559 Stack_Address : System.Address;
560 Stack_Size : System.Parameters.Size_Type;
561 Sec_Stack_Address : System.Secondary_Stack.SS_Stack_Ptr;
562 Sec_Stack_Size : System.Parameters.Size_Type;
563 Task_Info : System.Task_Info.Task_Info_Type;
564 CPU : Integer;
565 State : Task_Procedure_Access;
566 Discriminants : System.Address;
567 Elaborated : Access_Boolean;
568 Chain : in out Activation_Chain;
569 Task_Image : String;
570 Created_Task : Task_Id)
572 begin
573 if Partition_Elaboration_Policy = 'S' then
575 -- A unit may have been compiled without partition elaboration
576 -- policy, and in this case the compiler will emit calls for the
577 -- default policy (concurrent). But if the partition policy is
578 -- sequential, activation must be deferred.
580 Create_Restricted_Task_Sequential
581 (Priority, Stack_Address, Stack_Size, Sec_Stack_Address,
582 Sec_Stack_Size, Task_Info, CPU, State, Discriminants, Elaborated,
583 Task_Image, Created_Task);
585 else
586 Create_Restricted_Task
587 (Priority, Stack_Address, Stack_Size, Sec_Stack_Address,
588 Sec_Stack_Size, Task_Info, CPU, State, Discriminants, Elaborated,
589 Task_Image, Created_Task);
591 -- Append this task to the activation chain
593 Created_Task.Common.Activation_Link := Chain.T_ID;
594 Chain.T_ID := Created_Task;
595 end if;
596 end Create_Restricted_Task;
598 ---------------------------------------
599 -- Create_Restricted_Task_Sequential --
600 ---------------------------------------
602 procedure Create_Restricted_Task_Sequential
603 (Priority : Integer;
604 Stack_Address : System.Address;
605 Stack_Size : System.Parameters.Size_Type;
606 Sec_Stack_Address : System.Secondary_Stack.SS_Stack_Ptr;
607 Sec_Stack_Size : System.Parameters.Size_Type;
608 Task_Info : System.Task_Info.Task_Info_Type;
609 CPU : Integer;
610 State : Task_Procedure_Access;
611 Discriminants : System.Address;
612 Elaborated : Access_Boolean;
613 Task_Image : String;
614 Created_Task : Task_Id)
616 begin
617 Create_Restricted_Task
618 (Priority, Stack_Address, Stack_Size, Sec_Stack_Address,
619 Sec_Stack_Size, Task_Info, CPU, State, Discriminants, Elaborated,
620 Task_Image, Created_Task);
622 -- Append this task to the activation chain
624 Created_Task.Common.Activation_Link := Tasks_Activation_Chain;
625 Tasks_Activation_Chain := Created_Task;
626 end Create_Restricted_Task_Sequential;
628 ---------------------------
629 -- Finalize_Global_Tasks --
630 ---------------------------
632 -- This is needed to support the compiler interface; it will only be called
633 -- by the Environment task. Instead, it will cause the Environment to block
634 -- forever, since none of the dependent tasks are expected to terminate
636 procedure Finalize_Global_Tasks is
637 Self_ID : constant Task_Id := STPO.Self;
639 begin
640 pragma Assert (Self_ID = STPO.Environment_Task);
642 -- Handle normal task termination by the environment task, but only for
643 -- the normal task termination. In the case of Abnormal and
644 -- Unhandled_Exception they must have been handled before, and the task
645 -- termination soft link must have been changed so the task termination
646 -- routine is not executed twice.
648 -- Note that in the "normal" implementation in s-tassta.adb the task
649 -- termination procedure for the environment task should be executed
650 -- after termination of library-level tasks. However, this
651 -- implementation is to be used when the Ravenscar restrictions are in
652 -- effect, and AI-394 says that if there is a fall-back handler set for
653 -- the partition it should be called when the first task (including the
654 -- environment task) attempts to terminate.
656 SSL.Task_Termination_Handler.all (Ada.Exceptions.Null_Occurrence);
658 Write_Lock (Self_ID);
659 Sleep (Self_ID, Master_Completion_Sleep);
660 Unlock (Self_ID);
662 -- Should never return from Master Completion Sleep
664 raise Program_Error;
665 end Finalize_Global_Tasks;
667 ---------------------------
668 -- Restricted_Terminated --
669 ---------------------------
671 function Restricted_Terminated (T : Task_Id) return Boolean is
672 begin
673 return T.Common.State = Terminated;
674 end Restricted_Terminated;
676 --------------------
677 -- Terminate_Task --
678 --------------------
680 procedure Terminate_Task (Self_ID : Task_Id) is
681 begin
682 Self_ID.Common.State := Terminated;
683 end Terminate_Task;
685 --------------
686 -- Init_RTS --
687 --------------
689 procedure Init_RTS is
690 begin
691 Tasking.Initialize;
693 -- Initialize lock used to implement mutual exclusion between all tasks
695 STPO.Initialize_Lock (Global_Task_Lock'Access, STPO.Global_Task_Level);
697 -- Notify that the tasking run time has been elaborated so that
698 -- the tasking version of the soft links can be used.
700 SSL.Lock_Task := Task_Lock'Access;
701 SSL.Unlock_Task := Task_Unlock'Access;
702 SSL.Adafinal := Finalize_Global_Tasks'Access;
703 SSL.Get_Current_Excep := Get_Current_Excep'Access;
705 -- Initialize the tasking soft links (if not done yet) that are common
706 -- to the full and the restricted run times.
708 SSL.Tasking.Init_Tasking_Soft_Links;
709 end Init_RTS;
711 begin
712 Init_RTS;
713 end System.Tasking.Restricted.Stages;