eventq: revert code for unserializing events.
authorNathan Binkert <nate@binkert.org>
Tue, 14 Oct 2008 16:33:52 +0000 (09:33 -0700)
committerNathan Binkert <nate@binkert.org>
Tue, 14 Oct 2008 16:33:52 +0000 (09:33 -0700)
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

src/sim/eventq.cc

index f4fa0ac8b8bb125c770ffd1308602beca8d794c1..dfff760a02f3000ab4e5edd2a1c8857daf3c3ba2 100644 (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);
     }
 }