diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 11:07:33 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 11:07:33 +0100 |
commit | 30ebb1146dff85d153f99f89b9f479d4e479fd20 (patch) | |
tree | d3a7c1afcedd8f83c93b2ab9f79fc82cf1c07d50 /gcc/ada/bindgen.adb | |
parent | 2a8fcd43bd18b2b3a138c2a0f9607adaca668722 (diff) | |
download | gcc-30ebb1146dff85d153f99f89b9f479d4e479fd20.zip gcc-30ebb1146dff85d153f99f89b9f479d4e479fd20.tar.gz gcc-30ebb1146dff85d153f99f89b9f479d4e479fd20.tar.bz2 |
[multiple changes]
2012-10-29 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb (Analyze_Loop_Statement): Add warning for identical
inner/outer ranges.
2012-10-29 Robert Dewar <dewar@adacore.com>
* einfo.ads: Change terminology "present" to "defined" in talking
about whether a given field is defined for a given entity kind.
2012-10-29 Bob Duff <duff@adacore.com>
* atree.ads: Minor comment fix.
2012-10-29 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Replace_Type_Reference): Set_Comes_From_Source.
Otherwise, the node is ignored by ASIS.
* sem_ch5.adb: Minor reformatting.
2012-10-29 Thomas Quinot <quinot@adacore.com>
* exp_attr.adb, exp_dist.adb, exp_dist.ads (Build_To_Any_Call): Pass
an explicit Loc parameter to set the source location of generated
nodes.
2012-10-29 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb (Build_Task_Activation_Call): Do nothing on
restricted profile.
* bindgen.adb (System_Tasking_Restricted_Stages_Used): New variable.
(Gen_Adainit): Declare and call Activate_Tasks when the above variable
is set.
(Resolve_Binder_Options): Set the variable.
* rtsfind.ads (RE_Activate_Restricted_Tasks): Removed (now unused).
* s-tarest.adb (Tasks_Activation_Chain): New variable.
(Activate_Restricted_Tasks): Removed, and replaced by ...
(Activate_Tasks): New procedure, to activate all tasks at
the end of elaboration.
(Create_Restricted_Tasks): Chain parameter is now unreferenced. Put
the created task on the Tasks_Activation_Chain list.
* s-tarest.ads (Activate_Restricted_Tasks): Removed.
(Activate_Tasks): Added.
2012-10-29 Gary Dismukes <dismukes@adacore.com>
* sem_res.adb (Resolve_If_Expression): Compare subtype of the 'then'
expression against the subtype of the expression rather than comparing
base types, same as is already done for the 'else' expression.
From-SVN: r192918
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r-- | gcc/ada/bindgen.adb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index bb5a0aa..36c4196 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -78,6 +78,12 @@ package body Bindgen is -- disallow the creation of new dispatching domains just before calling -- the main procedure from the environment task. + System_Tasking_Restricted_Stages_Used : Boolean := False; + -- Flag indicating whether the unit System.Tasking.Restricted.Stages is in + -- the closure of the partition. This is set by Resolve_Binder_Options, + -- and it used to call a routine to active all the tasks at the end of + -- the elaboration. + Lib_Final_Built : Boolean := False; -- Flag indicating whether the finalize_library rountine has been built @@ -534,6 +540,12 @@ package body Bindgen is WBI (""); end if; + if System_Tasking_Restricted_Stages_Used then + WBI (" procedure Activate_Tasks;"); + WBI (" pragma Import (C, Activate_Tasks," & + " ""__gnat_activate_tasks"");"); + end if; + WBI (" begin"); if Main_Priority /= No_Main_Priority then @@ -625,6 +637,14 @@ package body Bindgen is WBI (" pragma Import (C, Handler_Installed, " & """__gnat_handler_installed"");"); + -- Import task activation procedure for ravenscar + + if System_Tasking_Restricted_Stages_Used then + WBI (" procedure Activate_Tasks;"); + WBI (" pragma Import (C, Activate_Tasks," & + " ""__gnat_activate_tasks"");"); + end if; + -- The import of the soft link which performs library-level object -- finalization is not needed for VM targets; regular Ada is used in -- that case. For restricted run-time libraries (ZFP and Ravenscar) @@ -945,6 +965,10 @@ package body Bindgen is WBI (" Freeze_Dispatching_Domains;"); end if; + if System_Tasking_Restricted_Stages_Used then + WBI (" Activate_Tasks;"); + end if; + -- Case of main program is CIL function or procedure if VM_Target = CLI_Target @@ -2863,6 +2887,12 @@ package body Bindgen is if OpenVMS_On_Target and then Name_Buffer (1 .. 5) = "dec%s" then With_DECGNAT := True; end if; + + -- Likewise for the use of restricted tasking + + if Name_Buffer (1 .. 34) = "system.tasking.restricted.stages%s" then + System_Tasking_Restricted_Stages_Used := True; + end if; end loop; end Resolve_Binder_Options; |