]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: move engine init to dynamic modules.c
authorMike Frysinger <vapier@gentoo.org>
Mon, 14 Jun 2021 02:40:09 +0000 (22:40 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 16:28:28 +0000 (12:28 -0400)
Use the new modules.c framework to find & initialize this module.

sim/common/ChangeLog
sim/common/sim-engine.c
sim/common/sim-engine.h
sim/common/sim-module.c

index e18d06bf01ab8fe72c92625769f4da1529f3ba12..5211321b9491e32cc962d53408dc4f2405723336 100644 (file)
@@ -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.
index 83f41f07deb7eb034a926fa00dbf30be22d15d45..2a0fb72d75030200247aa7a359db7ba8e5f8ee17 100644 (file)
@@ -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);
index 3ebf8acbaccc38550f92527d5bc0a72d1f35dc29..1feb8a6d40bb91de2418b268c1f1b5544be13308 100644 (file)
@@ -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
index 97d619c4aedd4addca8f2777b2ebbcd206125ad4..f4b74fcfe3a2c0aaac35389569b1cb44b9124e86 100644 (file)
@@ -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