[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-cvs
Subject:    [binutils-gdb] sim: move engine init to dynamic modules.c
From:       Michael Frysinger via Gdb-cvs <gdb-cvs () sourceware ! org>
Date:       2021-06-30 16:32:44
Message-ID: 20210630163244.407F03861C6A () sourceware ! org
[Download RAW message or body]

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=05d54a045c77ae24cf46327d3680a7c38b469351

commit 05d54a045c77ae24cf46327d3680a7c38b469351
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Jun 13 22:40:09 2021 -0400

    sim: move engine init to dynamic modules.c
    
    Use the new modules.c framework to find & initialize this module.

Diff:
---
 sim/common/ChangeLog    | 7 +++++++
 sim/common/sim-engine.c | 4 +++-
 sim/common/sim-engine.h | 4 ----
 sim/common/sim-module.c | 1 -
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index e18d06bf01a..5211321b949 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,10 @@
+2021-06-30  Mike Frysinger  <vapier@gentoo.org>
+
+	* sim-engine.c (sim_engine_install): Rename to ...
+	(sim_install_engine): ... this.  New prototype.
+	* sim-engine.h (sim_engine_install): Delete.
+	* sim-module.c (early_modules): Delete sim_engine_install.
+
 2021-06-30  Mike Frysinger  <vapier@gentoo.org>
 
 	* sim-config.h (WITH_MODEL): Delete.
diff --git a/sim/common/sim-engine.c b/sim/common/sim-engine.c
index 83f41f07deb..2a0fb72d750 100644
--- a/sim/common/sim-engine.c
+++ b/sim/common/sim-engine.c
@@ -208,9 +208,11 @@ sim_engine_init (SIM_DESC sd)
   return SIM_RC_OK;
 }
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+SIM_RC sim_install_engine (SIM_DESC sd);
 
 SIM_RC
-sim_engine_install (SIM_DESC sd)
+sim_install_engine (SIM_DESC sd)
 {
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
   sim_module_add_init_fn (sd, sim_engine_init);
diff --git a/sim/common/sim-engine.h b/sim/common/sim-engine.h
index 3ebf8acbacc..1feb8a6d40b 100644
--- a/sim/common/sim-engine.h
+++ b/sim/common/sim-engine.h
@@ -153,8 +153,4 @@ extern int sim_engine_last_cpu_nr (SIM_DESC sd);
 extern int sim_engine_nr_cpus (SIM_DESC sd);
 
 
-/* Establish the simulator engine */
-MODULE_INSTALL_FN sim_engine_install;
-
-
 #endif
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index 97d619c4aed..f4b74fcfe3a 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -37,7 +37,6 @@ static MODULE_INSTALL_FN * const early_modules[] = {
   standard_install,
   sim_events_install,
   sim_model_install,
-  sim_engine_install,
 #if WITH_TRACE_ANY_P
   trace_install,
 #endif
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic