From 05d54a045c77ae24cf46327d3680a7c38b469351 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 13 Jun 2021 22:40:09 -0400 Subject: sim: move engine init to dynamic modules.c Use the new modules.c framework to find & initialize this module. --- 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(-) (limited to 'sim') diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index e18d06b..5211321 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,12 @@ 2021-06-30 Mike Frysinger + * 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 + * sim-config.h (WITH_MODEL): Delete. (CURRENT_MODEL, MODEL_ISSUE_IGNORE, MODEL_ISSUE_PROCESS, WITH_MODEL_ISSUE, CURRENT_MODEL_ISSUE): Likewise. diff --git a/sim/common/sim-engine.c b/sim/common/sim-engine.c index 83f41f0..2a0fb72 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 3ebf8ac..1feb8a6 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 97d619c..f4b74fc 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 -- cgit v1.1