summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop-vxworks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 12:57:07 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 12:57:07 +0000
commite69349a188de8e328cd74322d728ede4ba698c43 (patch)
tree3bb649e90e39d2d01d9fece623fd10c1626cb568 /gcc/ada/s-taprop-vxworks.adb
parent1651a21f6856eec72adc31e92b17e02d8b787ab9 (diff)
downloadgcc-e69349a188de8e328cd74322d728ede4ba698c43.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taprop-vxworks.adb')
-rw-r--r--gcc/ada/s-taprop-vxworks.adb45
1 files changed, 3 insertions, 42 deletions
diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb
index 4cde338bfd3..6023ace5334 100644
--- a/gcc/ada/s-taprop-vxworks.adb
+++ b/gcc/ada/s-taprop-vxworks.adb
@@ -6,7 +6,7 @@
-- --
-- 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 --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -99,10 +99,6 @@ package body System.Task_Primitives.Operations is
Dispatching_Policy : Character;
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;
Foreign_Task_Elaborated : aliased Boolean := True;
@@ -734,20 +730,13 @@ package body System.Task_Primitives.Operations is
-- 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
(T : Task_Id;
Prio : System.Any_Priority;
Loss_Of_Inheritance : Boolean := False)
is
- Array_Item : Integer;
+ pragma Unreferenced (Loss_Of_Inheritance);
+
Result : int;
begin
@@ -756,34 +745,6 @@ package body System.Task_Primitives.Operations is
(T.Common.LL.Thread, To_VxWorks_Priority (int (Prio)));
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;
end Set_Priority;