aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-intman-solaris.adb
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2007-08-14 10:43:46 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:43:46 +0200
commit43316a012f70cb4f549d4a0a512d9a9e7d632c03 (patch)
treee16196828a28026759286dfe4f709fc46d3c6c9f /gcc/ada/s-intman-solaris.adb
parent2cd44f5a448ad1e160edae120cc7b945ca1a5db3 (diff)
downloadgcc-43316a012f70cb4f549d4a0a512d9a9e7d632c03.zip
gcc-43316a012f70cb4f549d4a0a512d9a9e7d632c03.tar.gz
gcc-43316a012f70cb4f549d4a0a512d9a9e7d632c03.tar.bz2
system-solaris-x86.ads (ZCX_By_Default): Switch to True.
2007-08-14 Olivier Hainque <hainque@adacore.com> * system-solaris-x86.ads (ZCX_By_Default): Switch to True. (GCC_ZCX_Support): Switch to True. * s-intman-solaris.adb (Notify_Exception): Call Adjust_Context_For_Raise before raising, as expected for signal handlers in general. * s-intman-posix.adb (Notify_Exception): Remove declaration of Adjust_Context_For_Raise, moved to the spec of this unit to be visible to other implementation bodies. * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to be visible by multiple implementation bodies. * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context only for conditions coming from hardware. [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement, adjustments to signal context prior to exception raise from signal handler. (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP mode. Solaris section: (__gnat_adjust_context_for_raise): New function. Implementation of the machine context adjustments to perform prior to raise from a signal handler. Version for both sparc and x86. (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define. (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it prior to raising as expected for any handler, before possible nested faults to make sure all the contexts in a chain have been adjusted by the time we propagate. From-SVN: r127433
Diffstat (limited to 'gcc/ada/s-intman-solaris.adb')
-rw-r--r--gcc/ada/s-intman-solaris.adb40
1 files changed, 21 insertions, 19 deletions
diff --git a/gcc/ada/s-intman-solaris.adb b/gcc/ada/s-intman-solaris.adb
index 8c4a6c1..626a14c 100644
--- a/gcc/ada/s-intman-solaris.adb
+++ b/gcc/ada/s-intman-solaris.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2006 Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2007, 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- --
@@ -31,14 +31,13 @@
-- --
------------------------------------------------------------------------------
--- This is a Solaris version of this package.
+-- This is a Solaris version of this package
--- Make a careful study of all signals available under the OS,
--- to see which need to be reserved, kept always unmasked,
--- or kept always unmasked.
+-- Make a careful study of all signals available under the OS, to see which
+-- need to be reserved, kept always unmasked, or kept always unmasked.
--- Be on the lookout for special signals that
--- may be used by the thread library.
+-- Be on the lookout for special signals that may be used by the thread
+-- library.
package body System.Interrupt_Management is
@@ -73,10 +72,10 @@ package body System.Interrupt_Management is
-- Notify_Exception --
----------------------
- -- This function identifies the Ada exception to be raised using
- -- the information when the system received a synchronous signal.
- -- Since this function is machine and OS dependent, different code
- -- has to be provided for different target.
+ -- This function identifies the Ada exception to be raised using the
+ -- information when the system received a synchronous signal. Since this
+ -- function is machine and OS dependent, different code has to be provided
+ -- for different target.
procedure Notify_Exception
(signo : Signal;
@@ -92,8 +91,12 @@ package body System.Interrupt_Management is
info : access siginfo_t;
context : access ucontext_t)
is
- pragma Unreferenced (context);
begin
+ -- Perform the necessary context adjustments prior to a raise
+ -- from a signal handler.
+
+ Adjust_Context_For_Raise (signo, context.all'Address);
+
-- Check that treatment of exception propagation here
-- is consistent with treatment of the abort signal in
-- System.Task_Primitives.Operations.
@@ -171,9 +174,8 @@ package body System.Interrupt_Management is
Result := sigemptyset (mask'Access);
pragma Assert (Result = 0);
- -- ??? For the same reason explained above, we can't mask these
- -- signals because otherwise we won't be able to catch more than
- -- one signal.
+ -- ??? For the same reason explained above, we can't mask these signals
+ -- because otherwise we won't be able to catch more than one signal.
act.sa_mask := mask;
@@ -239,10 +241,10 @@ package body System.Interrupt_Management is
Reserve (SIGINT) := False;
end if;
- -- We do not have Signal 0 in reality. We just use this value
- -- to identify not existing signals (see s-intnam.ads). Therefore,
- -- Signal 0 should not be used in all signal related operations hence
- -- mark it as reserved.
+ -- We do not have Signal 0 in reality. We just use this value to
+ -- identify not existing signals (see s-intnam.ads). Therefore, Signal 0
+ -- should not be used in all signal related operations hence mark it as
+ -- reserved.
Reserve (0) := True;
end Initialize;