diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-06 10:35:25 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-06 10:35:25 +0000 |
commit | a3a76ccc41dd9d4d6e05bdcc53a81cc9c98d6ccc (patch) | |
tree | b09f42a49b595c51ca661f47a4e6113ec4d568de /gcc/ada/s-taprop-solaris.adb | |
parent | 0fff5aefd695d45fe057d4ec877f78f5f55f242c (diff) | |
download | gcc-a3a76ccc41dd9d4d6e05bdcc53a81cc9c98d6ccc.tar.gz |
2011-09-06 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
variable for type of return value when return type is
unconstrained and context is an assignment.
2011-09-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
class-wide operation if expansion is not enabled.
2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): Deal with access
type prefix.
2011-09-06 Yannick Moy <moy@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, case
Aspect_Invariant): Do not issue error at this point on illegal
pragma placement, as this is checked later on when analyzing
the corresponding pragma.
* sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
similar to Error_Pragma_Arg, except the source name of the
aspect/pragma to use in warnings may be equal to parameter
Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
message to distinguish source name of pragma/aspect, and whether
the illegality resides in the type being public, or being private
without a public declaration
2011-09-06 Thomas Quinot <quinot@adacore.com>
* g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
size check (fd_set is implemented differently on that platform).
2011-09-06 Thomas Quinot <quinot@adacore.com>
* s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
(ATCB_Allocation): New subpackage of
System.Tasking.Primitive_Operations, shared across all targets
with full tasking runtime.
(ATCB_Allocation.New_ATCB): Moved there (from target specific
s-taprop bodies).
(ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
taking care of establishing a local temporary ATCB if the one
being deallocated is Self, to avoid a reference to the freed
ATCB in Abort_Undefer.
2011-09-06 Thomas Quinot <quinot@adacore.com>
* s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
terminated, mark it for deallocation upon termination.
(Terminate_Task): Call Free_Task again if the task is marked
for automatic deallocation upon termination.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178582 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taprop-solaris.adb')
-rw-r--r-- | gcc/ada/s-taprop-solaris.adb | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/gcc/ada/s-taprop-solaris.adb b/gcc/ada/s-taprop-solaris.adb index 421c60e219e..b5fe1ee9d42 100644 --- a/gcc/ada/s-taprop-solaris.adb +++ b/gcc/ada/s-taprop-solaris.adb @@ -38,8 +38,6 @@ pragma Polling (Off); -- Turn off polling, we do not want ATC polling to take place during tasking -- operations. It causes infinite loops and other problems. -with Ada.Unchecked_Deallocation; - with Interfaces.C; with System.Multiprocessors; @@ -226,6 +224,13 @@ package body System.Task_Primitives.Operations is package body Specific is separate; -- The body of this package is target specific + ---------------------------------- + -- ATCB allocation/deallocation -- + ---------------------------------- + + package body ATCB_Allocation is separate; + -- The body of this package is shared across several targets + --------------------------------- -- Support for foreign threads -- --------------------------------- @@ -868,26 +873,15 @@ package body System.Task_Primitives.Operations is procedure Enter_Task (Self_ID : Task_Id) is begin Self_ID.Common.LL.Thread := thr_self; - - Self_ID.Common.LL.LWP := lwp_self; + Self_ID.Common.LL.LWP := lwp_self; Set_Task_Affinity (Self_ID); - Specific.Set (Self_ID); -- We need the above code even if we do direct fetch of Task_Id in Self -- for the main task on Sun, x86 Solaris and for gcc 2.7.2. end Enter_Task; - -------------- - -- New_ATCB -- - -------------- - - function New_ATCB (Entry_Num : Task_Entry_Index) return Task_Id is - begin - return new Ada_Task_Control_Block (Entry_Num); - end New_ATCB; - ------------------- -- Is_Valid_Task -- ------------------- @@ -1032,12 +1026,7 @@ package body System.Task_Primitives.Operations is ------------------ procedure Finalize_TCB (T : Task_Id) is - Result : Interfaces.C.int; - Tmp : Task_Id := T; - Is_Self : constant Boolean := T = Self; - - procedure Free is new - Ada.Unchecked_Deallocation (Ada_Task_Control_Block, Task_Id); + Result : Interfaces.C.int; begin T.Common.LL.Thread := Null_Thread_Id; @@ -1054,11 +1043,7 @@ package body System.Task_Primitives.Operations is Known_Tasks (T.Known_Tasks_Index) := null; end if; - Free (Tmp); - - if Is_Self then - Specific.Set (null); - end if; + ATCB_Allocation.Free_ATCB (T); end Finalize_TCB; --------------- |