summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop-vxworks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 09:21:55 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 09:21:55 +0000
commit550b60cd430a0869547576ee62b7774c9c7e213e (patch)
tree3725855258e586f8b68daed8cfdfe5efa06f8cf7 /gcc/ada/s-taprop-vxworks.adb
parent132f079abbcfa82c414832aad3aedfe77f2049f6 (diff)
downloadgcc-550b60cd430a0869547576ee62b7774c9c7e213e.tar.gz
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb, prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize to Errout_Handling. 2011-08-03 Emmanuel Briot <briot@adacore.com> * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use "external" as an attribute name in aggregate projects. 2011-08-03 Jose Ruiz <ruiz@adacore.com> * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU uses CPU numbers starting 1, while VxWorks uses CPU numbers starting from 0, so we need to adjust. 2011-08-03 Emmanuel Briot <briot@adacore.com> * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb, prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177244 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taprop-vxworks.adb')
-rw-r--r--gcc/ada/s-taprop-vxworks.adb15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb
index d51a2ebaa7b..f94e3886742 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-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
@@ -954,8 +954,13 @@ package body System.Task_Primitives.Operations is
-- Set processor affinity
if T.Common.Base_CPU /= System.Multiprocessors.Not_A_Specific_CPU then
+ -- Ada 2012 pragma CPU uses CPU numbers starting from 1, while
+ -- on VxWorks the first CPU is identified by a 0, so we need to
+ -- adjust.
+
Result :=
- taskCpuAffinitySet (T.Common.LL.Thread, int (T.Common.Base_CPU));
+ taskCpuAffinitySet
+ (T.Common.LL.Thread, int (T.Common.Base_CPU) - 1);
elsif T.Common.Task_Info /= Unspecified_Task_Info then
Result :=
@@ -1412,10 +1417,14 @@ package body System.Task_Primitives.Operations is
if Environment_Task.Common.Base_CPU /=
System.Multiprocessors.Not_A_Specific_CPU
then
+ -- Ada 2012 pragma CPU uses CPU numbers starting from 1, while
+ -- on VxWorks the first CPU is identified by a 0, so we need to
+ -- adjust.
+
Result :=
taskCpuAffinitySet
(Environment_Task.Common.LL.Thread,
- int (Environment_Task.Common.Base_CPU));
+ int (Environment_Task.Common.Base_CPU) - 1);
pragma Assert (Result /= -1);
end if;
end Initialize;