diff options
Diffstat (limited to 'gcc/ada/s-tarest.adb')
| -rw-r--r-- | gcc/ada/s-tarest.adb | 91 |
1 files changed, 9 insertions, 82 deletions
diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb index be0c661..17c3ba6 100644 --- a/gcc/ada/s-tarest.adb +++ b/gcc/ada/s-tarest.adb @@ -67,6 +67,9 @@ with System.Soft_Links; -- The GNARL must call these to be sure that all non-tasking -- Ada constructs will work. +with System.Soft_Links.Tasking; +-- Used for Init_Tasking_Soft_Links + with System.Secondary_Stack; -- used for SS_Init; @@ -105,21 +108,6 @@ package body System.Tasking.Restricted.Stages is -- all nested locks must be released before other tasks competing for the -- tasking lock are released. - -- See s-tasini.adb for more information on the following functions. - - function Get_Jmpbuf_Address return Address; - procedure Set_Jmpbuf_Address (Addr : Address); - - function Get_Sec_Stack_Addr return Address; - procedure Set_Sec_Stack_Addr (Addr : Address); - - function Get_Machine_State_Addr return Address; - procedure Set_Machine_State_Addr (Addr : Address); - - function Get_Current_Excep return SSL.EOA; - - procedure Timed_Delay_T (Time : Duration; Mode : Integer); - ----------------------- -- Local Subprograms -- ----------------------- @@ -158,45 +146,6 @@ package body System.Tasking.Restricted.Stages is STPO.Unlock (Global_Task_Lock'Access, Global_Lock => True); end Task_Unlock; - ---------------------- - -- Soft-Link Bodies -- - ---------------------- - - function Get_Current_Excep return SSL.EOA is - begin - return STPO.Self.Common.Compiler_Data.Current_Excep'Access; - end Get_Current_Excep; - - function Get_Jmpbuf_Address return Address is - begin - return STPO.Self.Common.Compiler_Data.Jmpbuf_Address; - end Get_Jmpbuf_Address; - - function Get_Machine_State_Addr return Address is - begin - return STPO.Self.Common.Compiler_Data.Machine_State_Addr; - end Get_Machine_State_Addr; - - function Get_Sec_Stack_Addr return Address is - begin - return STPO.Self.Common.Compiler_Data.Sec_Stack_Addr; - end Get_Sec_Stack_Addr; - - procedure Set_Jmpbuf_Address (Addr : Address) is - begin - STPO.Self.Common.Compiler_Data.Jmpbuf_Address := Addr; - end Set_Jmpbuf_Address; - - procedure Set_Machine_State_Addr (Addr : Address) is - begin - STPO.Self.Common.Compiler_Data.Machine_State_Addr := Addr; - end Set_Machine_State_Addr; - - procedure Set_Sec_Stack_Addr (Addr : Address) is - begin - STPO.Self.Common.Compiler_Data.Sec_Stack_Addr := Addr; - end Set_Sec_Stack_Addr; - ------------------ -- Task_Wrapper -- ------------------ @@ -262,15 +211,6 @@ package body System.Tasking.Restricted.Stages is end; end Task_Wrapper; - ------------------- - -- Timed_Delay_T -- - ------------------- - - procedure Timed_Delay_T (Time : Duration; Mode : Integer) is - begin - STPO.Timed_Delay (STPO.Self, Time, Mode); - end Timed_Delay_T; - ----------------------- -- Restricted GNARLI -- ----------------------- @@ -566,27 +506,14 @@ package body System.Tasking.Restricted.Stages is -- Notify that the tasking run time has been elaborated so that -- the tasking version of the soft links can be used. - SSL.Lock_Task := Task_Lock'Access; - SSL.Unlock_Task := Task_Unlock'Access; - - SSL.Get_Jmpbuf_Address := Get_Jmpbuf_Address'Access; - SSL.Set_Jmpbuf_Address := Set_Jmpbuf_Address'Access; - SSL.Get_Machine_State_Addr := Get_Machine_State_Addr'Access; - SSL.Set_Machine_State_Addr := Set_Machine_State_Addr'Access; - SSL.Get_Current_Excep := Get_Current_Excep'Access; - SSL.Set_Jmpbuf_Address (SSL.Get_Jmpbuf_Address_NT); - SSL.Set_Machine_State_Addr (SSL.Get_Machine_State_Addr_NT); - - SSL.Get_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access; - SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access; - - -- No need to create a new Secondary Stack, since we will use the - -- default one created in s-secsta.adb + SSL.Lock_Task := Task_Lock'Access; + SSL.Unlock_Task := Task_Unlock'Access; + SSL.Adafinal := Finalize_Global_Tasks'Access; - Set_Sec_Stack_Addr (SSL.Get_Sec_Stack_Addr_NT); + -- Initialize the tasking soft links (if not done yet) that are common + -- to the full and the restricted run times. - SSL.Timed_Delay := Timed_Delay_T'Access; - SSL.Adafinal := Finalize_Global_Tasks'Access; + SSL.Tasking.Init_Tasking_Soft_Links; end Init_RTS; begin |
