diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2008-10-16 14:16:26 -0400 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2008-10-16 14:16:26 -0400 |
commit | 101c2d9174e34247c3f9013c24577a274a11ab39 (patch) | |
tree | a6e7c368b957593e4fffefe17e450eded43403b9 | |
parent | 90e40ca982ea99c3abb7bdebffaed48f467ff0e3 (diff) | |
parent | 5b07448cf12460090af588b332e813af3419d645 (diff) | |
download | gem5-101c2d9174e34247c3f9013c24577a274a11ab39.tar.xz |
Automated merge with ssh://daystrom.m5sim.org//z/repo/m5
-rw-r--r-- | src/python/m5/event.py | 3 | ||||
-rw-r--r-- | src/sim/eventq.cc | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/python/m5/event.py b/src/python/m5/event.py index 5d50448e7..2b43e578e 100644 --- a/src/python/m5/event.py +++ b/src/python/m5/event.py @@ -26,6 +26,7 @@ # # Authors: Nathan Binkert +import m5 import internal.event from internal.event import PythonEvent, SimLoopExitEvent as SimExit @@ -41,7 +42,7 @@ class Event(PythonEvent): def __init__(self, priority=None): if priority is None: priority = internal.event.Event.Default_Pri - super(PythonEvent, self).__init__(self, priority) + super(Event, self).__init__(self, priority) class ProgressEvent(Event): def __init__(self, eventq, period): 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 §ion) { - 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 §ion) 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); } } |