diff options
author | Robert Dewar <dewar@adacore.com> | 2008-03-26 08:35:19 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-03-26 08:35:19 +0100 |
commit | 366b8af7e4e5eda01cbdf8e4c2640ac0e84bcc34 (patch) | |
tree | f4283c76a38a1de33842f56020e3fffd6f796a0e /gcc/ada/s-interr-sigaction.adb | |
parent | 4e0ede3df752962d473249716152e00d779eec66 (diff) | |
download | gcc-366b8af7e4e5eda01cbdf8e4c2640ac0e84bcc34.zip gcc-366b8af7e4e5eda01cbdf8e4c2640ac0e84bcc34.tar.gz gcc-366b8af7e4e5eda01cbdf8e4c2640ac0e84bcc34.tar.bz2 |
a-taster.adb, [...]: Minor reformatting.
2008-03-26 Robert Dewar <dewar@adacore.com>
* a-taster.adb, s-shasto.adb, s-soflin.adb, s-taasde.adb, s-taenca.adb,
a-sytaco.adb, a-sytaco.ads, a-tasatt.adb, a-taside.adb,
a-intnam-lynxos.ads, a-retide.adb, a-intnam-tru64.ads, a-intnam-aix.ads,
a-intnam-irix.ads, a-intnam-hpux.ads, a-intnam-linux.ads,
a-intnam-solaris.ads, a-caldel-vms.adb, a-intnam-vms.ads,
a-excpol-abort.adb, a-intnam-mingw.ads, s-interr.adb, s-interr.ads,
s-intman.ads, s-gloloc.adb, s-osinte-lynxos-3.ads,
s-interr-sigaction.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
a-intnam-freebsd.ads, s-osinte-freebsd.ads, s-osinte-lynxos.ads,
s-taspri-lynxos.ads, s-osinte-tru64.ads, s-osinte-tru64.ads,
s-taspri-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads,
s-osinte-hpux-dce.ads, s-taprop-hpux-dce.adb, s-taspri-hpux-dce.ads,
s-osinte-linux.ads, s-osinte-dummy.ads, s-taprop-dummy.adb,
s-taspri-dummy.ads, s-interr-dummy.adb, s-osinte-solaris.ads,
s-osinte-mingw.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
s-inmaop-vms.adb, s-interr-vms.adb, s-intman-vms.ads, s-osinte-vms.ads,
s-osinte-vms.ads, s-taprop-vms.adb, s-taspri-vms.ads,
s-taspri-mingw.ads, s-interr-vxworks.adb, s-inmaop-posix.adb,
s-intman-vxworks.ads, s-osinte-vxworks.ads, s-osprim-vxworks.adb,
s-taspri-vxworks.ads, s-taspri-posix.ads, a-caldel.adb, a-calend.adb,
a-elchha.adb, a-dynpri.adb, a-except.adb, a-except.ads, a-interr.ads,
a-textio.adb, a-tigeau.ads, atree.adb, s-taprob.adb, s-taprop.ads,
s-tarest.adb, s-tarest.ads, s-tasini.adb, s-taskin.adb, s-taskin.ads,
s-tasque.adb, s-tasren.adb, s-tasren.ads, s-tassta.adb, s-tassta.ads,
s-tasuti.adb, s-tataat.adb, s-tataat.ads, s-tpoben.adb, s-tpoben.ads,
s-tpobop.adb, s-tpobop.ads, s-tposen.adb, s-tposen.ads, s-valrea.adb,
s-valuti.adb, a-intnam-darwin.ads, s-osinte-darwin.ads, s-solita.adb,
a-ztinau.ads, s-osinte-linux-hppa.ads, a-except-2005.adb,
a-except-2005.ads, a-rttiev.adb, s-osinte-vxworks6.ads, s-regexp.adb,
s-tasloc.adb: Minor reformatting.
Update comments.
Remove "used for" sections from comments.
From-SVN: r133546
Diffstat (limited to 'gcc/ada/s-interr-sigaction.adb')
-rw-r--r-- | gcc/ada/s-interr-sigaction.adb | 68 |
1 files changed, 21 insertions, 47 deletions
diff --git a/gcc/ada/s-interr-sigaction.adb b/gcc/ada/s-interr-sigaction.adb index 38428e5..a63b35a 100644 --- a/gcc/ada/s-interr-sigaction.adb +++ b/gcc/ada/s-interr-sigaction.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2008, 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- -- @@ -34,47 +34,22 @@ -- This is the IRIX & NT version of this package with Ada.Task_Identification; --- used for Task_Id +with Ada.Unchecked_Conversion; -with Ada.Exceptions; --- used for Raise_Exception +with Interfaces.C; with System.Storage_Elements; --- used for To_Address --- To_Integer - with System.Task_Primitives.Operations; --- used for Self --- Sleep --- Wakeup --- Write_Lock --- Unlock - with System.Tasking.Utilities; --- used for Make_Independent - with System.Tasking.Rendezvous; --- used for Call_Simple - with System.Tasking.Initialization; --- used for Defer_Abort --- Undefer_Abort - with System.Interrupt_Management; - with System.Parameters; --- used for Single_Lock - -with Interfaces.C; --- used for int - -with Ada.Unchecked_Conversion; package body System.Interrupts is use Parameters; use Tasking; - use Ada.Exceptions; use System.OS_Interface; use Interfaces.C; @@ -183,8 +158,8 @@ package body System.Interrupts is function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is begin if Is_Reserved (Interrupt) then - Raise_Exception (Program_Error'Identity, "Interrupt" & - Interrupt_ID'Image (Interrupt) & " is reserved"); + raise Program_Error with + "Interrupt" & Interrupt_ID'Image (Interrupt) & " is reserved"; end if; return Descriptors (Interrupt).T /= Null_Task; @@ -197,11 +172,11 @@ package body System.Interrupts is function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is begin if Is_Reserved (Interrupt) then - Raise_Exception (Program_Error'Identity, "Interrupt" & - Interrupt_ID'Image (Interrupt) & " is reserved"); + raise Program_Error with + "Interrupt" & Interrupt_ID'Image (Interrupt) & " is reserved"; + else + return Descriptors (Interrupt).Kind /= Unknown; end if; - - return Descriptors (Interrupt).Kind /= Unknown; end Is_Handler_Attached; ---------------- @@ -370,9 +345,9 @@ package body System.Interrupts is or else not Is_Registered (New_Handler)) then - Raise_Exception (Program_Error'Identity, + raise Program_Error with "Trying to overwrite a static Interrupt Handler with a " & - "dynamic Handler"); + "dynamic Handler"; end if; if Handlers (Interrupt) = null then @@ -420,12 +395,12 @@ package body System.Interrupts is -- In case we have an Interrupt Entry already installed. -- raise a program error. (propagate it to the caller). - Raise_Exception (Program_Error'Identity, - "An interrupt is already installed"); - end if; + raise Program_Error with "An interrupt is already installed"; - Old_Handler := Current_Handler (Interrupt); - Attach_Handler (New_Handler, Interrupt, Static); + else + Old_Handler := Current_Handler (Interrupt); + Attach_Handler (New_Handler, Interrupt, Static); + end if; end Exchange_Handler; -------------------- @@ -442,13 +417,12 @@ package body System.Interrupts is end if; if Descriptors (Interrupt).Kind = Task_Entry then - Raise_Exception (Program_Error'Identity, - "Trying to detach an Interrupt Entry"); + raise Program_Error with "Trying to detach an Interrupt Entry"; end if; if not Static and then Descriptors (Interrupt).Static then - Raise_Exception (Program_Error'Identity, - "Trying to detach a static Interrupt Handler"); + raise Program_Error with + "Trying to detach a static Interrupt Handler"; end if; Descriptors (Interrupt) := @@ -548,8 +522,8 @@ package body System.Interrupts is end if; if Descriptors (Interrupt).Kind /= Unknown then - Raise_Exception (Program_Error'Identity, - "A binding for this interrupt is already present"); + raise Program_Error with + "A binding for this interrupt is already present"; end if; if Handlers (Interrupt) = null then |