diff options
Diffstat (limited to 'gcc/ada/s-taskin.adb')
-rw-r--r-- | gcc/ada/s-taskin.adb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/s-taskin.adb b/gcc/ada/s-taskin.adb index d2d29f9246e..c79171b23c3 100644 --- a/gcc/ada/s-taskin.adb +++ b/gcc/ada/s-taskin.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- -- @@ -218,6 +218,21 @@ package body System.Tasking is T.Common.Task_Image_Len := Main_Task_Image'Length; T.Common.Task_Image (Main_Task_Image'Range) := Main_Task_Image; + -- At program start-up the environment task is allocated to the default + -- system dispatching domain. + -- Make sure that the processors which are not available are not taken + -- into account. Use Number_Of_CPUs to know the exact number of + -- processors in the system at execution time. + + System_Domain := new Dispatching_Domain' + (Multiprocessors.CPU'First .. Multiprocessors.Number_Of_CPUs => True); + + T.Common.Domain := System_Domain; + + -- ??? If we want to handle the interaction between pragma CPU and + -- dispatching domains we would need to signal that this task is being + -- allocated to a processor. + -- Only initialize the first element since others are not relevant -- in ravenscar mode. Rest of the initialization is done in Init_RTS. |