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
This commit is contained in:
Nathan Binkert
2008-10-14 09:33:52 -07:00
parent 809f6cb6d1
commit ff2eea1ba3

View File

@@ -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);
}
}