From 30ce620d1d7b04387072e2dcf87530c33eb7c608 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Mon, 5 Jul 2010 21:39:38 -0700 Subject: sim: fold StartupCallback into SimObject There used to be a reason to have StartupCallback be a separate object, but not any more. Now it's just confusing. --- src/sim/sim_object.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/sim/sim_object.hh') diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh index 3a96cf8f6..2bea97301 100644 --- a/src/sim/sim_object.hh +++ b/src/sim/sim_object.hh @@ -45,7 +45,6 @@ #include "params/SimObject.hh" #include "sim/eventq.hh" #include "sim/serialize.hh" -#include "sim/startup.hh" class BaseCPU; class Event; @@ -55,8 +54,7 @@ class Event; * correspond to physical components and can be specified via the * config file (CPUs, caches, etc.). */ -class SimObject - : public EventManager, public Serializable, protected StartupCallback +class SimObject : public EventManager, public Serializable { public: enum State { @@ -103,6 +101,11 @@ class SimObject virtual void regFormulas(); virtual void resetStats(); + // final initialization before simulation + // all state is unserialized so + virtual void startup(); + static void startupAll(); + // static: call reg_stats on all SimObjects static void regAllStats(); -- cgit v1.2.3