diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-27 12:56:12 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-27 12:56:12 +0100 |
commit | 2f97d24cad349a09ee1beb3e20b636925aa9baa9 (patch) | |
tree | 35eda234e18f129cc90e7b4653320126aa073196 /gcc/ada/bindgen.adb | |
parent | 4e48e02be82c63ebe6687bca93f07b76b5765261 (diff) | |
download | gcc-2f97d24cad349a09ee1beb3e20b636925aa9baa9.zip gcc-2f97d24cad349a09ee1beb3e20b636925aa9baa9.tar.gz gcc-2f97d24cad349a09ee1beb3e20b636925aa9baa9.tar.bz2 |
[multiple changes]
2015-10-27 Tristan Gingold <gingold@adacore.com>
* bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
New variable.
(Gen_Adainit): Call Start_All_CPUs if the above
variable is set to true.
2015-10-27 Emmanuel Briot <briot@adacore.com>
* adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
subprogram.
From-SVN: r229429
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r-- | gcc/ada/bindgen.adb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index e284a0e..098a1ae 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -88,6 +88,12 @@ package body Bindgen is -- attach interrupt handlers at the end of the elaboration when partition -- elaboration policy is sequential. + System_BB_CPU_Primitives_Multiprocessors_Used : Boolean := False; + -- Flag indicating wether the unit System.BB.CPU_Primitives.Multiprocessors + -- is in the closure of the partiation. This is set by procedure + -- Resolve_Binder_Options, and it is used to call a procedure that starts + -- slave processors. + Lib_Final_Built : Boolean := False; -- Flag indicating whether the finalize_library rountine has been built @@ -536,6 +542,13 @@ package body Bindgen is WBI (" procedure Activate_All_Tasks_Sequential;"); WBI (" pragma Import (C, Activate_All_Tasks_Sequential," & " ""__gnat_activate_all_tasks"");"); + WBI (""); + end if; + + if System_BB_CPU_Primitives_Multiprocessors_Used then + WBI (" procedure Start_Slave_CPUs;"); + WBI (" pragma Import (C, Start_Slave_CPUs," & + " ""__gnat_start_slave_cpus"");"); end if; WBI (" begin"); @@ -944,6 +957,10 @@ package body Bindgen is end if; end if; + if System_BB_CPU_Primitives_Multiprocessors_Used then + WBI (" Start_Slave_CPUs;"); + end if; + WBI (" end " & Ada_Init_Name.all & ";"); WBI (""); end Gen_Adainit; @@ -2872,6 +2889,12 @@ package body Bindgen is -- Ditto for the use of restrictions Check_Package (System_Restrictions_Used, "system.restrictions%s"); + + -- Ditto for use of an SMP bareboard runtime + + Check_Package (System_BB_CPU_Primitives_Multiprocessors_Used, + "system.bb.cpu_primitives.multiprocessors%s"); + end loop; end Resolve_Binder_Options; |