summaryrefslogtreecommitdiff
path: root/gcc/ada/s-tassta.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:53:05 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:53:05 +0000
commit63edfb2cf91752a6a24248f7883b997f24cacfa9 (patch)
treeee457e312509fbe5ce66d2926fdf9ede4463a300 /gcc/ada/s-tassta.adb
parentc9d3640b2e9c6c5c8bb6925bad72408c4a3039fb (diff)
downloadgcc-63edfb2cf91752a6a24248f7883b997f24cacfa9.tar.gz
2005-11-14 Jose Ruiz <ruiz@adacore.com>
* s-tassta.adb (Create_Task): Move the code in charge of resetting the deferral level, when abort is not allowed, to a later stage (the Task_Wrapper). (Task_Wrapper): If Abort is not allowed, reset the deferral level since it will not get changed by the generated code. It was previously done in Create_Task. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-tassta.adb')
-rw-r--r--gcc/ada/s-tassta.adb20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb
index 1ac7edb2dd0..54f92ebcde8 100644
--- a/gcc/ada/s-tassta.adb
+++ b/gcc/ada/s-tassta.adb
@@ -617,16 +617,6 @@ 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;
@@ -950,6 +940,16 @@ package body System.Tasking.Stages is
Lock_RTS;
Unlock_RTS;
+ 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.
+
+ Self_ID.Deferral_Level := 0;
+ end if;
+
begin
-- We are separating the following portion of the code in order to
-- place the exception handlers in a different block. In this way,