diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 08:13:21 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-02 08:13:21 +0000 |
commit | c7b7b140a45aaa8c7f5b8aa6d6efe580241c7ee9 (patch) | |
tree | d10af131f48cfe83e17d537c53b5f2c9bdf5aaa6 /gcc/ada/s-intman-vxworks.adb | |
parent | bb020a20147d1a840289a8aea0eff5847215f83d (diff) | |
download | gcc-c7b7b140a45aaa8c7f5b8aa6d6efe580241c7ee9.tar.gz |
2011-08-02 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Can_Override_Operator): New function.
(Verify_Overriding_Indicator): Add missing code to check overriding
indicator in operators. Fixes regression.
(Check_Overriding_Indicator): Minor reformating after replacing the
code that evaluates if the subprogram can override an operator by
invocations to the above new function.
* einfo.adb
(Write_Field26_Name): Add missing code to ensure that, following
the documentation in einfo.ads, this field is not shown as attribute
"Static_Initialization" on non-dispatching functions.
2011-08-02 Jose Ruiz <ruiz@adacore.com>
* sem_res.adb (Resolve_Call): A call to
Ada.Real_Time.Timing_Events.Set_Handler violates restriction
No_Relative_Delay (AI-0211) only when it sets a relative timing event,
i.e., when the second parameter is of type Time_Span.
2011-08-02 Vincent Celier <celier@adacore.com>
* make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
with an archive instead of -L<library dir> -l<library name>.
2011-08-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
mark the base types In_Use in addition to making the operations
use_visible.
2011-08-02 Ed Falis <falis@adacore.com>
* init.c: add and setup __gnat_signal_mask for the exception signals
* s-inmaop-vxworks.adb: new file.
* s-intman-vxworks.adb: remove unnecessary initializations and
simplify remaining
* s-intman-vxworks.ads: remove unnecessary variable
* s-taprop-vxworks.adb: simplify signal initialization
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177092 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-intman-vxworks.adb')
-rw-r--r-- | gcc/ada/s-intman-vxworks.adb | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/gcc/ada/s-intman-vxworks.adb b/gcc/ada/s-intman-vxworks.adb index dacc418f05c..853d746d137 100644 --- a/gcc/ada/s-intman-vxworks.adb +++ b/gcc/ada/s-intman-vxworks.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, 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,9 +31,8 @@ -- This is the VxWorks 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. Be on --- the lookout for special signals that may be used by the thread library. +-- It is simpler than other versions because the Ada interrupt handling +-- mechanisms are used for hardware interrupts rather than signals. package body System.Interrupt_Management is @@ -45,15 +44,21 @@ package body System.Interrupt_Management is (SIGFPE, SIGILL, SIGSEGV, SIGBUS); Exception_Action : aliased struct_sigaction; - -- Keep this variable global so that it is initialized only once + -- Keep this a variable global so that it is initialized only once + + Signal_Mask : aliased sigset_t; + pragma Import (C, Signal_Mask, "__gnat_signal_mask"); + -- Mask indicating that all exception signals are to be masked + -- when a signal is propagated. procedure Notify_Exception (signo : Signal; siginfo : System.Address; sigcontext : System.Address); pragma Import (C, Notify_Exception, "__gnat_error_handler"); - -- Map signal to Ada exception and raise it. Different versions - -- of VxWorks need different mappings. + -- Map a signal to Ada exception and raise it. Different versions + -- of VxWorks need different mappings. This is addressed in init.c in + -- __gnat_map_signal. ----------------------- -- Local Subprograms -- @@ -62,7 +67,7 @@ package body System.Interrupt_Management is function State (Int : Interrupt_ID) return Character; pragma Import (C, State, "__gnat_get_interrupt_state"); -- Get interrupt state. Defined in init.c The input argument is the - -- interrupt number, and the result is one of the following: + -- hardware interrupt number, and the result is one of the following: Runtime : constant Character := 'r'; Default : constant Character := 's'; @@ -100,8 +105,6 @@ package body System.Interrupt_Management is -- Set to True once Initialize is called, further calls have no effect procedure Initialize is - mask : aliased sigset_t; - Result : int; begin if Initialized then @@ -115,17 +118,11 @@ package body System.Interrupt_Management is Abort_Task_Interrupt := SIGABRT; + -- Signal_Mask was initialized in __gnat_install_handler + Exception_Action.sa_handler := Notify_Exception'Address; Exception_Action.sa_flags := SA_ONSTACK + SA_SIGINFO; - Result := sigemptyset (mask'Access); - pragma Assert (Result = 0); - - for J in Exception_Signals'Range loop - Result := sigaddset (mask'Access, Signal (Exception_Signals (J))); - pragma Assert (Result = 0); - end loop; - - Exception_Action.sa_mask := mask; + Exception_Action.sa_mask := Signal_Mask; -- Initialize hardware interrupt handling @@ -139,15 +136,6 @@ package body System.Interrupt_Management is end if; end loop; - -- Add exception signals to the set of unmasked signals - - for J in Exception_Signals'Range loop - Keep_Unmasked (Exception_Signals (J)) := True; - end loop; - - -- The abort signal must also be unmasked - - Keep_Unmasked (Abort_Task_Interrupt) := True; end Initialize; end System.Interrupt_Management; |