diff options
Diffstat (limited to 'gcc/ada/s-tassta.adb')
-rw-r--r-- | gcc/ada/s-tassta.adb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/s-tassta.adb b/gcc/ada/s-tassta.adb index 410cc8c..57c28be 100644 --- a/gcc/ada/s-tassta.adb +++ b/gcc/ada/s-tassta.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, 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- -- @@ -527,6 +527,12 @@ package body System.Tasking.Stages is then Self_ID.Common.Base_Priority else System.Any_Priority (Priority)); + -- Legal values of CPU are the special Unspecified_CPU value which is + -- inserted by the compiler for tasks without CPU aspect, and those in + -- the range of CPU_Range but no greater than Number_Of_CPUs. Otherwise + -- the task is defined to have failed, and it becomes a completed task + -- (RM D.16(14/3)). + if CPU /= Unspecified_CPU and then (CPU < Integer (System.Multiprocessors.CPU_Range'First) or else @@ -539,6 +545,13 @@ package body System.Tasking.Stages is -- Normal CPU affinity else + -- When the application code says nothing about the task affinity + -- (task without CPU aspect) then the compiler inserts the + -- Unspecified_CPU value which indicates to the run-time library that + -- the task will activate and execute on the same processor as its + -- activating task if the activating task is assigned a processor + -- (RM D.16(14/3)). + Base_CPU := (if CPU = Unspecified_CPU then Self_ID.Common.Base_CPU |