CPU: If the simple CPU is already idle, just return from suspendContext, don't assert.
This commit is contained in:
parent
05b5861419
commit
d10195b1a4
|
@ -271,6 +271,9 @@ AtomicSimpleCPU::suspendContext(int thread_num)
|
|||
assert(thread_num == 0);
|
||||
assert(thread);
|
||||
|
||||
if (_status == Idle)
|
||||
return;
|
||||
|
||||
assert(_status == Running);
|
||||
|
||||
// tick event may not be scheduled if this gets called from inside
|
||||
|
|
|
@ -233,6 +233,9 @@ TimingSimpleCPU::suspendContext(int thread_num)
|
|||
assert(thread_num == 0);
|
||||
assert(thread);
|
||||
|
||||
if (_status == Idle)
|
||||
return;
|
||||
|
||||
assert(_status == Running);
|
||||
|
||||
// just change status to Idle... if status != Running,
|
||||
|
|
Loading…
Reference in a new issue