aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJerome Lambourg <lambourg@adacore.com>2019-08-12 08:59:08 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-12 08:59:08 +0000
commit96a8b7050beeb1a28d0e2c2a8d3e841ea38d450c (patch)
treef029116c9099d7dc410720720c4dc94a1ebeb815 /gcc
parent43eb2bb6967ffd6d9b9fadfa606c177671c28261 (diff)
downloadgcc-96a8b7050beeb1a28d0e2c2a8d3e841ea38d450c.zip
gcc-96a8b7050beeb1a28d0e2c2a8d3e841ea38d450c.tar.gz
gcc-96a8b7050beeb1a28d0e2c2a8d3e841ea38d450c.tar.bz2
[Ada] VxWorks: call s-tpopsp.Self only when needed
2019-08-12 Jerome Lambourg <lambourg@adacore.com> gcc/ada/ * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call s-tpopsp.Self when actually needed. From-SVN: r274283
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/libgnarl/s-taprop__vxworks.adb7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index df19f1b..b656a02 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-12 Jerome Lambourg <lambourg@adacore.com>
+
+ * libgnarl/s-taprop__vxworks.adb (Abort_Handler): Only call
+ s-tpopsp.Self when actually needed.
+
2019-08-12 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Discrete_Range_Check): Return if checks are
diff --git a/gcc/ada/libgnarl/s-taprop__vxworks.adb b/gcc/ada/libgnarl/s-taprop__vxworks.adb
index 80a7290..6ef0a9b 100644
--- a/gcc/ada/libgnarl/s-taprop__vxworks.adb
+++ b/gcc/ada/libgnarl/s-taprop__vxworks.adb
@@ -192,7 +192,10 @@ package body System.Task_Primitives.Operations is
procedure Abort_Handler (signo : Signal) is
pragma Unreferenced (signo);
- Self_ID : constant Task_Id := Self;
+ -- Do not call Self at this point as we're in a signal handler
+ -- and it may not be available, in particular on targets where we
+ -- support ZCX and where we don't do anything here anyway.
+ Self_ID : Task_Id;
Old_Set : aliased sigset_t;
Unblocked_Mask : aliased sigset_t;
Result : int;
@@ -208,6 +211,8 @@ package body System.Task_Primitives.Operations is
return;
end if;
+ Self_ID := Self;
+
if Self_ID.Deferral_Level = 0
and then Self_ID.Pending_ATC_Level < Self_ID.ATC_Nesting_Level
and then not Self_ID.Aborting