summaryrefslogtreecommitdiff
path: root/src/sim/sim_object.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-07-05 21:39:38 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-07-05 21:39:38 -0700
commit30ce620d1d7b04387072e2dcf87530c33eb7c608 (patch)
tree04d03bbf19ffcec6691b9348b544faf0e5f80992 /src/sim/sim_object.hh
parent345dfd1b41729162ff31da010cce0659ce810897 (diff)
downloadgem5-30ce620d1d7b04387072e2dcf87530c33eb7c608.tar.xz
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.
Diffstat (limited to 'src/sim/sim_object.hh')
-rw-r--r--src/sim/sim_object.hh9
1 files changed, 6 insertions, 3 deletions
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();