summaryrefslogtreecommitdiffstats
path: root/gcc/ada/s-tassta.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 15:42:23 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 15:42:23 +0000
commit63740d1a0b295bd19f3e92ee45b817cc932b5c4a (patch)
treea567f37d6620f7897e8162479e2d462ff14e3131 /gcc/ada/s-tassta.adb
parenta5342ce68dd70eff04503899cb28be77fc6e0ca0 (diff)
downloadppe42-gcc-63740d1a0b295bd19f3e92ee45b817cc932b5c4a.tar.gz
ppe42-gcc-63740d1a0b295bd19f3e92ee45b817cc932b5c4a.zip
* s-tasini.ads, s-tasini.adb (Undefer_Abortion): Handle case of
Self_Id.Deferral_Level = 0. (Do_Pending_Action): Move this function to the spec. * s-tasren.adb (Selective_Wait [Terminate_Selected]): Call Do_Pending_Action explicitely when needed, in case we're using No_Abort restrictions. * s-tassta.adb (Create_Task): If Abort is not allowed, reset the deferral level since it will not get changed by the generated code. Keeping a default value of 1 would prevent some operations (e.g. select or delay) to proceed successfully. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tassta.adb')
-rw-r--r--gcc/ada/s-tassta.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb
index 784dade88d8..e09b6a56459 100644
--- a/gcc/ada/s-tassta.adb
+++ b/gcc/ada/s-tassta.adb
@@ -103,6 +103,9 @@ with System.Secondary_Stack;
with System.Storage_Elements;
-- used for Storage_Array
+with System.Restrictions;
+-- used for Abort_Allowed
+
with System.Standard_Library;
-- used for Exception_Trace
@@ -614,6 +617,16 @@ package body System.Tasking.Stages is
(Storage_Error'Identity, "Failed to initialize task");
end if;
+ if not System.Restrictions.Abort_Allowed then
+
+ -- If Abort is not allowed, reset the deferral level since it will
+ -- not get changed by the generated code. Keeping a default value
+ -- of one would prevent some operations (e.g. select or delay) to
+ -- proceed successfully.
+
+ T.Deferral_Level := 0;
+ end if;
+
T.Master_of_Task := Master;
T.Master_Within := T.Master_of_Task + 1;
OpenPOWER on IntegriCloud