summaryrefslogtreecommitdiff
path: root/cpu/base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/base.cc')
-rw-r--r--cpu/base.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/cpu/base.cc b/cpu/base.cc
index 2eb5f7fd3..74b679d5d 100644
--- a/cpu/base.cc
+++ b/cpu/base.cc
@@ -164,6 +164,7 @@ BaseCPU::Params::Params()
#if FULL_SYSTEM
profile = false;
#endif
+ checker = NULL;
}
void
@@ -229,15 +230,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->setCpuId(system->registerExecContext(xc, id));
#else
xc->setCpuId(xc->getProcessPtr()->registerExecContext(xc));
#endif
+ }
}
}