sim, arch, base: Refactor the base remote GDB class.
[gem5.git] / src / sim / root.cc
index 752632b5eed94967e62c7b77ec35aa8c0f8f1a25..41dad77b4e93306921f5e261cbc2b9f2307a4f4c 100644 (file)
@@ -31,7 +31,7 @@
  *          Gabe Black
  */
 
-#include "base/misc.hh"
+#include "base/logging.hh"
 #include "base/trace.hh"
 #include "config/the_isa.hh"
 #include "debug/TimeSync.hh"
@@ -104,8 +104,9 @@ Root::timeSyncSpinThreshold(Time newThreshold)
     timeSyncEnable(en);
 }
 
-Root::Root(RootParams *p) : SimObject(p), _enabled(false),
-    _periodTick(p->time_sync_period), syncEvent(this)
+Root::Root(RootParams *p)
+    : SimObject(p), _enabled(false), _periodTick(p->time_sync_period),
+      syncEvent([this]{ timeSync(); }, name())
 {
     _period.setTick(p->time_sync_period);
     _spinThreshold.setTick(p->time_sync_spin_threshold);
@@ -118,18 +119,11 @@ Root::Root(RootParams *p) : SimObject(p), _enabled(false),
 }
 
 void
-Root::initState()
+Root::startup()
 {
     timeSyncEnable(params()->time_sync_enable);
 }
 
-void
-Root::loadState(CheckpointIn &cp)
-{
-    SimObject::loadState(cp);
-    timeSyncEnable(params()->time_sync_enable);
-}
-
 void
 Root::serialize(CheckpointOut &cp) const
 {
@@ -138,10 +132,6 @@ Root::serialize(CheckpointOut &cp) const
     SERIALIZE_SCALAR(isa);
 }
 
-void
-Root::unserialize(CheckpointIn &cp)
-{}
-
 
 bool FullSystem;
 unsigned int FullSystemInt;