summaryrefslogtreecommitdiff
path: root/gcc/ada/s-intman.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:43:46 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:43:46 +0000
commit6925ea9f399f9d12d3de44754eec7d5af40e620c (patch)
treee16196828a28026759286dfe4f709fc46d3c6c9f /gcc/ada/s-intman.ads
parent81a1245619aa40d3dc8fd8d7efd65b39a8019179 (diff)
downloadgcc-6925ea9f399f9d12d3de44754eec7d5af40e620c.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127433 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-intman.ads')
-rw-r--r--gcc/ada/s-intman.ads25
1 files changed, 16 insertions, 9 deletions
diff --git a/gcc/ada/s-intman.ads b/gcc/ada/s-intman.ads
index a7909c91c49..528fbf45090 100644
--- a/gcc/ada/s-intman.ads
+++ b/gcc/ada/s-intman.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2005 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- --
@@ -70,10 +70,8 @@ package System.Interrupt_Management is
-- systems, but is always reserved when it is defined. If we have the
-- convention that ID zero is not used for any "real" signals, and SIGRARE
-- = 0 when SIGRARE is not one of the locally supported signals, we can
- -- write
-
+ -- write:
-- Reserved (SIGRARE) := True;
-
-- and the initialization code will be portable.
Abort_Task_Interrupt : Interrupt_ID;
@@ -96,13 +94,22 @@ package System.Interrupt_Management is
-- or used to implement time delays.
procedure Initialize;
- -- Initialize the various variables defined in this package.
- -- This procedure must be called before accessing any object from this
- -- package, and can be called multiple times.
+ -- Initialize the various variables defined in this package. This procedure
+ -- must be called before accessing any object from this package, and can be
+ -- called multiple times.
private
type Interrupt_Mask is new System.OS_Interface.sigset_t;
- -- In some implementations Interrupt_Mask can be represented as a linked
- -- list.
+ -- In some implementations Interrupt_Mask is represented as a linked list
+
+ procedure Adjust_Context_For_Raise
+ (Signo : System.OS_Interface.Signal;
+ Ucontext : System.Address);
+ pragma Import
+ (C, Adjust_Context_For_Raise, "__gnat_adjust_context_for_raise");
+ -- Target specific hook performing adjustments to the signal's machine
+ -- context, to be called before an exception may be raised from a signal
+ -- handler. This service is provided by init.c, together with the
+ -- non-tasking signal handler.
end System.Interrupt_Management;