Commit fda5d6d4 by Jose Ruiz Committed by Arnaud Charlet

s-tassta.adb (Create_Task): Move the code in charge of resetting the deferral level...

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.

From-SVN: r106960
parent 982f26e4
...@@ -617,16 +617,6 @@ package body System.Tasking.Stages is ...@@ -617,16 +617,6 @@ package body System.Tasking.Stages is
(Storage_Error'Identity, "Failed to initialize task"); (Storage_Error'Identity, "Failed to initialize task");
end if; 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_of_Task := Master;
T.Master_Within := T.Master_of_Task + 1; T.Master_Within := T.Master_of_Task + 1;
...@@ -950,6 +940,16 @@ package body System.Tasking.Stages is ...@@ -950,6 +940,16 @@ package body System.Tasking.Stages is
Lock_RTS; Lock_RTS;
Unlock_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 begin
-- We are separating the following portion of the code in order to -- We are separating the following portion of the code in order to
-- place the exception handlers in a different block. In this way, -- place the exception handlers in a different block. In this way,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment