diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-07-20 12:26:51 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-07-20 12:26:51 +0200 |
commit | 35ae2ed81410448471c46f7757e6bc879d4de250 (patch) | |
tree | 238119d8dcbfc65df92cc128baf647ad882d0617 /gcc/ada/s-tasini.adb | |
parent | a6c0a76c5f9eb216b5f08ffc4624a6d039ca3977 (diff) | |
download | gcc-35ae2ed81410448471c46f7757e6bc879d4de250.zip gcc-35ae2ed81410448471c46f7757e6bc879d4de250.tar.gz gcc-35ae2ed81410448471c46f7757e6bc879d4de250.tar.bz2 |
[multiple changes]
2004-07-20 Olivier Hainque <hainque@act-europe.fr>
* a-elchha.adb (Last_Chance_Handler): Remove the bogus buffer dynamic
allocation and potentially overflowing update with
Tailored_Exception_Information. Use the sec-stack free procedural
interface to output Exception_Information instead.
* a-except.adb (To_Stderr): New subprogram for character, and string
version moved from a-exextr to be visible from other separate units.
(Tailored_Exception_Information): Remove the procedural version,
previously used by the default Last_Chance_Handler and not any more.
Adjust various comments.
* a-exexda.adb: Generalize the exception information procedural
interface, to minimize the use of secondary stack and the need for
local buffers when the info is to be output to stderr:
(Address_Image): Removed.
(Append_Info_Character): New subprogram, checking for overflows and
outputing to stderr if buffer to fill is of length 0.
(Append_Info_String): Output to stderr if buffer to fill is of length 0.
(Append_Info_Address, Append_Info_Exception_Name,
Append_Info_Exception_Message, Append_Info_Basic_Exception_Information,
Append_Info_Basic_Exception_Traceback,
Append_Info_Exception_Information): New subprograms.
(Append_Info_Nat, Append_Info_NL): Use Append_Info_Character.
(Basic_Exception_Info_Maxlength, Basic_Exception_Tback_Maxlength,
Exception_Info_Maxlength, Exception_Name_Length,
Exception_Message_Length): New subprograms.
(Exception_Information): Use Append_Info_Exception_Information.
(Tailored_Exception_Information): Use
Append_Info_Basic_Exception_Information.
Export services for the default Last_Chance_Handler.
* a-exextr.adb (To_Stderr): Remove. Now in a-except to be usable by
other separate units.
2004-07-20 Vincent Celier <celier@gnat.com>
* clean.adb, mlib-utl.adb, osint.adb, makegpr.adb: Minor reformatting.
2004-07-20 Ed Schonberg <schonberg@gnat.com>
* freeze.adb (Freeze_Entity): If entity is a discriminated record type,
emit itype references for the designated types of component types that
are declared outside of the full record declaration, and that may
denote a partial view of that record type.
2004-07-20 Ed Schonberg <schonberg@gnat.com>
PR ada/15607
* sem_ch3.adb (Build_Discriminated_Subtype): Do not attach a subtype
which is the designated type in an access component declaration, to the
list of incomplete dependents of the parent type, to avoid elaboration
issues with out-of-scope subtypes.
(Complete_Private_Subtype): Recompute Has_Unknown_Discriminants from the
full view of the parent.
2004-07-20 Ed Schonberg <schonberg@gnat.com>
PR ada/15610
* sem_ch8.adb (Find_Expanded_Name): If name is overloaded, reject
entities that are hidden, such as references to generic actuals
outside an instance.
2004-07-20 Javier Miranda <miranda@gnat.com>
* sem_ch4.adb (Try_Object_Operation): New subprogram that gives
support to the new notation.
(Analyze_Selected_Component): Add call to Try_Object_Operation.
2004-07-20 Jose Ruiz <ruiz@act-europe.fr>
* s-taprob.adb: Adding the elaboration code required for initializing
the tasking soft links that are common to the full and the restricted
run times.
* s-tarest.adb (Init_RTS): Tasking soft links that are shared with the
restricted run time has been moved to the package
System.Soft_Links.Tasking.
* s-tasini.adb (Init_RTS): Tasking soft links that are shared with the
restricted run time has been moved to the package
System.Soft_Links.Tasking.
* Makefile.rtl: Add entry for s-solita.o in run-time library list.
* s-solita.ads, s-solita.adb: New files.
2004-07-20 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* trans.c (Identifier_to_gnu, Pragma_to_gnu, Attribute_to_gnu,
Case_Statement_to_gnu): Split off from gnat_to_gnu.
(Loop_Statement_to_gnu, Subprogram_Body_to_gnu, call_to_gnu,
Handled_Sequence_Of_Statements_to_gnu, Exception_Handler_to_gnu_sjlj,
Exception_Handler_to_gnu_zcx): Likewise.
From-SVN: r84948
Diffstat (limited to 'gcc/ada/s-tasini.adb')
-rw-r--r-- | gcc/ada/s-tasini.adb | 106 |
1 files changed, 21 insertions, 85 deletions
diff --git a/gcc/ada/s-tasini.adb b/gcc/ada/s-tasini.adb index d05654a..871b2d0 100644 --- a/gcc/ada/s-tasini.adb +++ b/gcc/ada/s-tasini.adb @@ -60,6 +60,9 @@ with System.Soft_Links; -- used for the non-tasking routines (*_NT) that refer to global data. -- They are needed here before the tasking run time has been elaborated. +with System.Soft_Links.Tasking; +-- Used for Init_Tasking_Soft_Links + with System.Tasking.Debug; -- used for Trace @@ -87,9 +90,9 @@ package body System.Tasking.Initialization is (Ada, Current_Target_Exception, "__gnat_current_target_exception"); -- Import this subprogram from the private part of Ada.Exceptions. - ----------------------------------------------------------------- - -- Tasking versions of services needed by non-tasking programs -- - ----------------------------------------------------------------- + ---------------------------------------------------------------------- + -- Tasking versions of some services needed by non-tasking programs -- + ---------------------------------------------------------------------- procedure Task_Lock; -- Locks out other tasks. Preceding a section of code by Task_Lock and @@ -104,14 +107,6 @@ package body System.Tasking.Initialization is -- all nested locks must be released before other tasks competing for the -- tasking lock are released. - function Get_Jmpbuf_Address return Address; - procedure Set_Jmpbuf_Address (Addr : Address); - -- Get/Set Jmpbuf_Address for current task - - function Get_Sec_Stack_Addr return Address; - procedure Set_Sec_Stack_Addr (Addr : Address); - -- Get/Set location of current task's secondary stack - function Get_Exc_Stack_Addr return Address; -- Get the exception stack for the current task @@ -119,16 +114,6 @@ package body System.Tasking.Initialization is -- Self_ID is the Task_Id of the task that gets the exception stack. -- For Self_ID = Null_Address, the current task gets the exception stack. - function Get_Machine_State_Addr return Address; - procedure Set_Machine_State_Addr (Addr : Address); - -- Get/Set the address for storing the current task's machine state - - function Get_Current_Excep return SSL.EOA; - -- Task-safe version of SSL.Get_Current_Excep - - procedure Timed_Delay_T (Time : Duration; Mode : Integer); - -- Task-safe version of SSL.Timed_Delay - function Get_Stack_Info return Stack_Checking.Stack_Access; -- Get access to the current task's Stack_Info @@ -404,30 +389,21 @@ package body System.Tasking.Initialization is SSL.Abort_Undefer := Undefer_Abortion'Access; end if; - SSL.Update_Exception := Update_Exception'Access; - 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_Sec_Stack_Addr := Get_Sec_Stack_Addr'Access; - SSL.Set_Sec_Stack_Addr := Set_Sec_Stack_Addr'Access; - SSL.Get_Exc_Stack_Addr := Get_Exc_Stack_Addr'Access; - SSL.Set_Exc_Stack_Addr := Set_Exc_Stack_Addr'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.Timed_Delay := Timed_Delay_T'Access; - SSL.Check_Abort_Status := Check_Abort_Status'Access; - SSL.Get_Stack_Info := Get_Stack_Info'Access; - SSL.Task_Name := Task_Name'Access; - - -- No need to create a new Secondary Stack, since we will use the - -- default one created in s-secsta.adb - - SSL.Set_Sec_Stack_Addr (SSL.Get_Sec_Stack_Addr_NT); - SSL.Set_Exc_Stack_Addr (Null_Address, SSL.Get_Exc_Stack_Addr_NT); - SSL.Set_Jmpbuf_Address (SSL.Get_Jmpbuf_Address_NT); - SSL.Set_Machine_State_Addr (SSL.Get_Machine_State_Addr_NT); + SSL.Update_Exception := Update_Exception'Access; + SSL.Lock_Task := Task_Lock'Access; + SSL.Unlock_Task := Task_Unlock'Access; + SSL.Get_Exc_Stack_Addr := Get_Exc_Stack_Addr'Access; + SSL.Set_Exc_Stack_Addr := Set_Exc_Stack_Addr'Access; + SSL.Check_Abort_Status := Check_Abort_Status'Access; + SSL.Get_Stack_Info := Get_Stack_Info'Access; + SSL.Task_Name := Task_Name'Access; + + SSL.Set_Exc_Stack_Addr (Null_Address, SSL.Get_Exc_Stack_Addr_NT); + + -- Initialize the tasking soft links (if not done yet) that are common + -- to the full and the restricted run times. + + SSL.Tasking.Init_Tasking_Soft_Links; -- Install tasking locks in the GCC runtime. @@ -920,31 +896,11 @@ package body System.Tasking.Initialization is -- 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_Exc_Stack_Addr return Address is begin return STPO.Self.Common.Compiler_Data.Exc_Stack_Addr; end Get_Exc_Stack_Addr; - 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; - function Get_Stack_Info return Stack_Checking.Stack_Access is begin return STPO.Self.Common.Compiler_Data.Pri_Stack_Info'Access; @@ -960,26 +916,6 @@ package body System.Tasking.Initialization is Me.Common.Compiler_Data.Exc_Stack_Addr := Addr; end Set_Exc_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; - - procedure Timed_Delay_T (Time : Duration; Mode : Integer) is - begin - STPO.Timed_Delay (STPO.Self, Time, Mode); - end Timed_Delay_T; - ----------------------- -- Soft-Link Dummies -- ----------------------- |