summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-14 09:33:52 -0700
committerNathan Binkert <nate@binkert.org>2008-10-14 09:33:52 -0700
commitff2eea1ba3b8716f259075654c7463f9395264d7 (patch)
treeb35b6f1236364440404a1d5d4c918e7bed034607
parent809f6cb6d1c199563664305fe3b0b286c54dbea7 (diff)
downloadgem5-ff2eea1ba3b8716f259075654c7463f9395264d7.tar.xz
eventq: revert code for unserializing events.
Since I never implemented a proper solution, put it back to something that at least works for now. Once I add more event queues, I'll have to really fix this though
-rw-r--r--src/sim/eventq.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index f4fa0ac8b..dfff760a0 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -209,7 +209,8 @@ Event::serialize(std::ostream &os)
void
Event::unserialize(Checkpoint *cp, const string &section)
{
- assert(!scheduled() && "we used to deschedule these events");
+ if (scheduled())
+ mainEventQueue.deschedule(this);
UNSERIALIZE_SCALAR(_when);
UNSERIALIZE_SCALAR(_priority);
@@ -223,8 +224,7 @@ Event::unserialize(Checkpoint *cp, const string &section)
if (wasScheduled) {
DPRINTF(Config, "rescheduling at %d\n", _when);
- panic("need to figure out how to unserialize scheduled events");
- //schedule(_when);
+ mainEventQueue.schedule(this, _when);
}
}