From patchwork Mon Aug 29 13:08:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 112042 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 291B7B6F9A for ; Mon, 29 Aug 2011 23:08:20 +1000 (EST) Received: (qmail 28256 invoked by alias); 29 Aug 2011 13:08:18 -0000 Received: (qmail 28026 invoked by uid 22791); 29 Aug 2011 13:08:16 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 13:08:02 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 89F912BB149; Mon, 29 Aug 2011 09:08:01 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2GwXb9L40qEf; Mon, 29 Aug 2011 09:08:01 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id D49A92BB12F; Mon, 29 Aug 2011 09:08:00 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id C5ED792A55; Mon, 29 Aug 2011 09:08:00 -0400 (EDT) Date: Mon, 29 Aug 2011 09:08:00 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Tristan Gingold Subject: [Ada] Remove Exc_Stack (was unused) Message-ID: <20110829130800.GA1791@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This exception stack was once used by VMS, but isn't anymore. No functional change. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-29 Tristan Gingold * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove. (Initialize_TCB): Remove Exc_Stack_Ptr initialization. (Finalize_TCB): Remove its finalization. (Initialize): Remove assignment of GET_Exc_Stack_Addr * s-soflin.adb (NT_Exc_Stack): Remove (Get_Exc_Stack_Addr_NT): Likewise. (Get_Exc_Stack_Addr_Soft): Likewise. * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove. (Get_Exc_Stack_Addr): Likewise. (Get_Exc_Stack_Addr_Soft): Likewise * s-taspri-vms.ads (Exc_Stack_T): Remove. (Exc_Stack_Ptr_T): Likewise. (Private_Data): Remove Exc_Stack_Ptr component. Index: s-taprop-vms.adb =================================================================== --- s-taprop-vms.adb (revision 178155) +++ s-taprop-vms.adb (working copy) @@ -136,9 +136,6 @@ new Ada.Unchecked_Conversion (Task_Id, System.Task_Primitives.Task_Address); - function Get_Exc_Stack_Addr return Address; - -- Replace System.Soft_Links.Get_Exc_Stack_Addr_NT - procedure Timer_Sleep_AST (ID : Address); pragma Convention (C, Timer_Sleep_AST); -- Signal the condition variable when AST fires @@ -755,7 +752,6 @@ if Result = 0 then Succeeded := True; - Self_ID.Common.LL.Exc_Stack_Ptr := new Exc_Stack_T; else if not Single_Lock then @@ -770,15 +766,6 @@ pragma Assert (Result = 0); end Initialize_TCB; - ------------------------ - -- Get_Exc_Stack_Addr -- - ------------------------ - - function Get_Exc_Stack_Addr return Address is - begin - return Self.Common.LL.Exc_Stack_Ptr (Exc_Stack_T'Last)'Address; - end Get_Exc_Stack_Addr; - ----------------- -- Create_Task -- ----------------- @@ -859,9 +846,6 @@ procedure Free is new Ada.Unchecked_Deallocation (Ada_Task_Control_Block, Task_Id); - procedure Free is new Ada.Unchecked_Deallocation - (Exc_Stack_T, Exc_Stack_Ptr_T); - begin if not Single_Lock then Result := pthread_mutex_destroy (T.Common.LL.L'Access); @@ -875,7 +859,6 @@ Known_Tasks (T.Known_Tasks_Index) := null; end if; - Free (T.Common.LL.Exc_Stack_Ptr); Free (Tmp); if Is_Self then @@ -1247,8 +1230,6 @@ begin Environment_Task_Id := Environment_Task; - SSL.Get_Exc_Stack_Addr := Get_Exc_Stack_Addr'Access; - -- Initialize the lock used to synchronize chain of all ATCBs Initialize_Lock (Single_RTS_Lock'Access, RTS_Lock_Level); Index: s-soflin.adb =================================================================== --- s-soflin.adb (revision 178155) +++ s-soflin.adb (working copy) @@ -46,11 +46,6 @@ package SST renames System.Secondary_Stack; - NT_Exc_Stack : array (0 .. 8192) of aliased Character; - for NT_Exc_Stack'Alignment use Standard'Maximum_Alignment; - -- Allocate an exception stack for the main program to use. - -- This is currently only used under VMS. - NT_TSD : TSD; -- Note: we rely on the default initialization of NT_TSD @@ -173,24 +168,6 @@ return NT_TSD.Current_Excep'Access; end Get_Current_Excep_NT; - --------------------------- - -- Get_Exc_Stack_Addr_NT -- - --------------------------- - - function Get_Exc_Stack_Addr_NT return Address is - begin - return NT_Exc_Stack (NT_Exc_Stack'Last)'Address; - end Get_Exc_Stack_Addr_NT; - - ----------------------------- - -- Get_Exc_Stack_Addr_Soft -- - ----------------------------- - - function Get_Exc_Stack_Addr_Soft return Address is - begin - return Get_Exc_Stack_Addr.all; - end Get_Exc_Stack_Addr_Soft; - ------------------------ -- Get_GNAT_Exception -- ------------------------ Index: s-soflin.ads =================================================================== --- s-soflin.ads (revision 178155) +++ s-soflin.ads (working copy) @@ -243,9 +243,6 @@ Get_Sec_Stack_Addr : Get_Address_Call := Get_Sec_Stack_Addr_NT'Access; Set_Sec_Stack_Addr : Set_Address_Call := Set_Sec_Stack_Addr_NT'Access; - function Get_Exc_Stack_Addr_NT return Address; - Get_Exc_Stack_Addr : Get_Address_Call := Get_Exc_Stack_Addr_NT'Access; - function Get_Current_Excep_NT return EOA; Get_Current_Excep : Get_EOA_Call := Get_Current_Excep_NT'Access; @@ -389,8 +386,6 @@ pragma Inline (Get_Sec_Stack_Addr_Soft); pragma Inline (Set_Sec_Stack_Addr_Soft); - function Get_Exc_Stack_Addr_Soft return Address; - -- The following is a dummy record designed to mimic Communication_Block as -- defined in s-tpobop.ads: Index: s-taspri-vms.ads =================================================================== --- s-taspri-vms.ads (revision 178155) +++ s-taspri-vms.ads (working copy) @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1991-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1991-2011, Free Software Foundation, Inc. -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -78,10 +78,6 @@ private - type Exc_Stack_T is array (0 .. 8192) of aliased Character; - for Exc_Stack_T'Alignment use Standard'Maximum_Alignment; - type Exc_Stack_Ptr_T is access all Exc_Stack_T; - type Lock is record L : aliased System.OS_Interface.pthread_mutex_t; Prio : Interfaces.C.int; @@ -121,9 +117,6 @@ L : aliased RTS_Lock; -- Protection for all components is lock L - Exc_Stack_Ptr : Exc_Stack_Ptr_T; - -- ??? This needs comments - AST_Pending : Boolean; -- Used to detect delay and sleep timeouts