CPU: If the simple CPU is already idle, just return from suspendContext, don't assert.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user