public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/4] sim: move engine init to dynamic modules.c
@ 2021-06-30 15:13 Mike Frysinger
  2021-06-30 15:13 ` [PATCH 2/4] sim: move trace " Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mike Frysinger @ 2021-06-30 15:13 UTC (permalink / raw)
  To: gdb-patches

Use the new modules.c framework to find & initialize this module.
---
 sim/common/sim-engine.c | 4 +++-
 sim/common/sim-engine.h | 4 ----
 sim/common/sim-module.c | 1 -
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/sim/common/sim-engine.c b/sim/common/sim-engine.c
index 83f41f07deb7..2a0fb72d7503 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 3ebf8acbaccc..1feb8a6d40bb 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 97d619c4aedd..f4b74fcfe3a2 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
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-30 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 15:13 [PATCH 1/4] sim: move engine init to dynamic modules.c Mike Frysinger
2021-06-30 15:13 ` [PATCH 2/4] sim: move trace " Mike Frysinger
2021-06-30 15:13 ` [PATCH 3/4] sim: move profile " Mike Frysinger
2021-06-30 15:13 ` [PATCH 4/4] sim: move scache " Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).