Commit 144c034d by Arnaud Charlet Committed by Arnaud Charlet

s-tassta.adb (Create_Task): Fix violation of locking rule.

2009-04-24  Arnaud Charlet  <charlet@adacore.com>

	* s-tassta.adb (Create_Task): Fix violation of locking rule.

From-SVN: r146685
parent e0697153
2009-04-24 Arnaud Charlet <charlet@adacore.com>
* s-tassta.adb (Create_Task): Fix violation of locking rule.
2009-04-24 Emmanuel Briot <briot@adacore.com>
* prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb (Language_Index): renamed
......
......@@ -621,14 +621,18 @@ package body System.Tasking.Stages is
T.Common.Task_Image_Len := Len;
end if;
Unlock (Self_ID);
Unlock_RTS;
-- Note: we should not call 'new' while holding locks since new
-- may use locks (e.g. RTS_Lock under Windows) itself and cause a
-- deadlock.
if Build_Entry_Names then
T.Entry_Names :=
new Entry_Names_Array (1 .. Entry_Index (Num_Entries));
end if;
Unlock (Self_ID);
Unlock_RTS;
-- Create TSD as early as possible in the creation of a task, since it
-- may be used by the operation of Ada code within the task.
......
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