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