make this parallel to the other cpu types so that resume works correctly.

--HG--
extra : convert_revision : 3c165af27ea0e6c7f2a17819c1717d8900f54cc1
This commit is contained in:
Lisa Hsu 2006-10-23 18:43:56 -04:00
parent 049f8d53a9
commit 0a2387f38c

View file

@ -182,11 +182,14 @@ AtomicSimpleCPU::unserialize(Checkpoint *cp, const string &section)
void
AtomicSimpleCPU::resume()
{
changeState(SimObject::Running);
if (thread->status() == ThreadContext::Active) {
if (_status != SwitchedOut && _status != Idle) {
assert(system->getMemoryMode() == System::Atomic);
if (!tickEvent.scheduled())
tickEvent.schedule(curTick);
changeState(SimObject::Running);
if (thread->status() == ThreadContext::Active) {
if (!tickEvent.scheduled())
tickEvent.schedule(curTick);
}
}
}