diff options
Diffstat (limited to 'cpu/base.cc')
-rw-r--r-- | cpu/base.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cpu/base.cc b/cpu/base.cc index 8b94b8533..64ea9aaa8 100644 --- a/cpu/base.cc +++ b/cpu/base.cc @@ -59,7 +59,7 @@ BaseCPU::BaseCPU(Params *p) #else BaseCPU::BaseCPU(Params *p) : SimObject(p->name), clock(p->clock), params(p), - number_of_threads(p->numberOfThreads) + number_of_threads(p->numberOfThreads), system(p->system) #endif { DPRINTF(FullCPU, "BaseCPU: Creating object, mem address %#x.\n", this); @@ -211,15 +211,18 @@ BaseCPU::registerExecContexts() { for (int i = 0; i < execContexts.size(); ++i) { ExecContext *xc = execContexts[i]; + + if (xc->status() == ExecContext::Suspended) { #if FULL_SYSTEM - int id = params->cpu_id; - if (id != -1) - id += i; + int id = params->cpu_id; + if (id != -1) + id += i; - xc->cpu_id = system->registerExecContext(xc, id); + xc->cpu_id = system->registerExecContext(xc, id); #else - xc->cpu_id = xc->process->registerExecContext(xc); + xc->cpu_id = xc->process->registerExecContext(xc); #endif + } } } |