diff options
-rw-r--r-- | src/cpu/simple/atomic.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 4e52f9b33..9d7181cea 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -194,15 +194,16 @@ AtomicSimpleCPU::unserialize(Checkpoint *cp, const string §ion) void AtomicSimpleCPU::resume() { + if (_status == Idle || _status == SwitchedOut) + return; + DPRINTF(SimpleCPU, "Resume\n"); - if (_status != SwitchedOut && _status != Idle) { - assert(system->getMemoryMode() == Enums::atomic); + assert(system->getMemoryMode() == Enums::atomic); - changeState(SimObject::Running); - if (thread->status() == ThreadContext::Active) { - if (!tickEvent.scheduled()) { - tickEvent.schedule(nextCycle()); - } + changeState(SimObject::Running); + if (thread->status() == ThreadContext::Active) { + if (!tickEvent.scheduled()) { + tickEvent.schedule(nextCycle()); } } } |