Commit 55c1c66d by Arnaud Charlet

[multiple changes]

2010-06-22  Emmanuel Briot  <briot@adacore.com>

	* prj-part.adb, prj.adb, tempdir.ads, makeutl.adb: Use
	packages from the GNAT hierarchy instead of System when possible.
	* gcc-interface/Make-lang.in: Update dependencies.

2010-06-22  Jose Ruiz  <ruiz@adacore.com>

	* s-taprop-vxworks.adb (Set_Priority): Remove the code that was
	previously in place to reorder the ready queue when a task drops its
	priority due to the loss of inherited priority.

From-SVN: r161174
parent 31b8a02d
2010-06-22 Emmanuel Briot <briot@adacore.com>
* prj-part.adb, prj.adb, tempdir.ads, makeutl.adb: Use
packages from the GNAT hierarchy instead of System when possible.
* gcc-interface/Make-lang.in: Update dependencies.
2010-06-22 Jose Ruiz <ruiz@adacore.com>
* s-taprop-vxworks.adb (Set_Priority): Remove the code that was
previously in place to reorder the ready queue when a task drops its
priority due to the loss of inherited priority.
2010-06-22 Vincent Celier <celier@adacore.com> 2010-06-22 Vincent Celier <celier@adacore.com>
* projects.texi: Minor spelling error fixes. * projects.texi: Minor spelling error fixes.
......
...@@ -39,10 +39,8 @@ with Ada.Command_Line; use Ada.Command_Line; ...@@ -39,10 +39,8 @@ with Ada.Command_Line; use Ada.Command_Line;
with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Directory_Operations; use GNAT.Directory_Operations;
pragma Warnings (Off); with GNAT.Case_Util; use GNAT.Case_Util;
with System.Case_Util; use System.Case_Util; with GNAT.HTable;
with System.HTable;
pragma Warnings (On);
package body Makeutl is package body Makeutl is
...@@ -61,7 +59,7 @@ package body Makeutl is ...@@ -61,7 +59,7 @@ package body Makeutl is
function Hash (Key : Mark_Key) return Mark_Num; function Hash (Key : Mark_Key) return Mark_Num;
package Marks is new System.HTable.Simple_HTable package Marks is new GNAT.HTable.Simple_HTable
(Header_Num => Mark_Num, (Header_Num => Mark_Num,
Element => Boolean, Element => Boolean,
No_Element => False, No_Element => False,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
......
...@@ -40,10 +40,7 @@ with Ada.Characters.Handling; use Ada.Characters.Handling; ...@@ -40,10 +40,7 @@ with Ada.Characters.Handling; use Ada.Characters.Handling;
with Ada.Exceptions; use Ada.Exceptions; with Ada.Exceptions; use Ada.Exceptions;
with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.HTable; use GNAT.HTable;
pragma Warnings (Off);
with System.HTable; use System.HTable;
pragma Warnings (On);
package body Prj.Part is package body Prj.Part is
...@@ -100,7 +97,7 @@ package body Prj.Part is ...@@ -100,7 +97,7 @@ package body Prj.Part is
-- limited imported projects when there is a circularity with at least -- limited imported projects when there is a circularity with at least
-- one limited imported project file. -- one limited imported project file.
package Virtual_Hash is new System.HTable.Simple_HTable package Virtual_Hash is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num, (Header_Num => Header_Num,
Element => Project_Node_Id, Element => Project_Node_Id,
No_Element => Empty_Node, No_Element => Empty_Node,
...@@ -110,7 +107,7 @@ package body Prj.Part is ...@@ -110,7 +107,7 @@ package body Prj.Part is
-- Hash table to store the node id of the project for which a virtual -- Hash table to store the node id of the project for which a virtual
-- extending project need to be created. -- extending project need to be created.
package Processed_Hash is new System.HTable.Simple_HTable package Processed_Hash is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num, (Header_Num => Header_Num,
Element => Boolean, Element => Boolean,
No_Element => False, No_Element => False,
...@@ -121,7 +118,7 @@ package body Prj.Part is ...@@ -121,7 +118,7 @@ package body Prj.Part is
-- need to have a virtual extending project, to avoid processing the same -- need to have a virtual extending project, to avoid processing the same
-- project twice. -- project twice.
package Projects_Paths is new System.HTable.Simple_HTable package Projects_Paths is new GNAT.HTable.Simple_HTable
(Header_Num => Header_Num, (Header_Num => Header_Num,
Element => Path_Name_Type, Element => Path_Name_Type,
No_Element => No_Path, No_Element => No_Path,
......
...@@ -36,10 +36,8 @@ with Ada.Unchecked_Deallocation; ...@@ -36,10 +36,8 @@ with Ada.Unchecked_Deallocation;
with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Directory_Operations; use GNAT.Directory_Operations;
pragma Warnings (Off); with GNAT.Case_Util; use GNAT.Case_Util;
with System.Case_Util; use System.Case_Util; with GNAT.HTable;
with System.HTable;
pragma Warnings (On);
package body Prj is package body Prj is
...@@ -570,7 +568,7 @@ package body Prj is ...@@ -570,7 +568,7 @@ package body Prj is
-- Hash -- -- Hash --
---------- ----------
function Hash is new System.HTable.Hash (Header_Num => Header_Num); function Hash is new GNAT.HTable.Hash (Header_Num => Header_Num);
-- Used in implementation of other functions Hash below -- Used in implementation of other functions Hash below
function Hash (Name : File_Name_Type) return Header_Num is function Hash (Name : File_Name_Type) return Header_Num is
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -99,10 +99,6 @@ package body System.Task_Primitives.Operations is ...@@ -99,10 +99,6 @@ package body System.Task_Primitives.Operations is
Dispatching_Policy : Character; Dispatching_Policy : Character;
pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy"); pragma Import (C, Dispatching_Policy, "__gl_task_dispatching_policy");
function Get_Policy (Prio : System.Any_Priority) return Character;
pragma Import (C, Get_Policy, "__gnat_get_specific_dispatching");
-- Get priority specific dispatching policy
Mutex_Protocol : Priority_Type; Mutex_Protocol : Priority_Type;
Foreign_Task_Elaborated : aliased Boolean := True; Foreign_Task_Elaborated : aliased Boolean := True;
...@@ -734,20 +730,13 @@ package body System.Task_Primitives.Operations is ...@@ -734,20 +730,13 @@ package body System.Task_Primitives.Operations is
-- Set_Priority -- -- Set_Priority --
------------------ ------------------
type Prio_Array_Type is array (System.Any_Priority) of Integer;
pragma Atomic_Components (Prio_Array_Type);
Prio_Array : Prio_Array_Type;
-- Global array containing the id of the currently running task for each
-- priority. Note that we assume that we are on a single processor with
-- run-till-blocked scheduling.
procedure Set_Priority procedure Set_Priority
(T : Task_Id; (T : Task_Id;
Prio : System.Any_Priority; Prio : System.Any_Priority;
Loss_Of_Inheritance : Boolean := False) Loss_Of_Inheritance : Boolean := False)
is is
Array_Item : Integer; pragma Unreferenced (Loss_Of_Inheritance);
Result : int; Result : int;
begin begin
...@@ -756,34 +745,6 @@ package body System.Task_Primitives.Operations is ...@@ -756,34 +745,6 @@ package body System.Task_Primitives.Operations is
(T.Common.LL.Thread, To_VxWorks_Priority (int (Prio))); (T.Common.LL.Thread, To_VxWorks_Priority (int (Prio)));
pragma Assert (Result = 0); pragma Assert (Result = 0);
if (Dispatching_Policy = 'F' or else Get_Policy (Prio) = 'F')
and then Loss_Of_Inheritance
and then Prio < T.Common.Current_Priority
then
-- Annex D requirement (RM D.2.2(9)):
-- If the task drops its priority due to the loss of inherited
-- priority, it is added at the head of the ready queue for its
-- new active priority.
Array_Item := Prio_Array (T.Common.Base_Priority) + 1;
Prio_Array (T.Common.Base_Priority) := Array_Item;
loop
-- Give some processes a chance to arrive
taskDelay (0);
-- Then wait for our turn to proceed
exit when Array_Item = Prio_Array (T.Common.Base_Priority)
or else Prio_Array (T.Common.Base_Priority) = 1;
end loop;
Prio_Array (T.Common.Base_Priority) :=
Prio_Array (T.Common.Base_Priority) - 1;
end if;
T.Common.Current_Priority := Prio; T.Common.Current_Priority := Prio;
end Set_Priority; end Set_Priority;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 2003-2007, Free Software Foundation, Inc. -- -- Copyright (C) 2003-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
with Namet; use Namet; with Namet; use Namet;
with System.OS_Lib; use System.OS_Lib; with GNAT.OS_Lib; use GNAT.OS_Lib;
package Tempdir is package Tempdir is
......
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