summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2008-11-02 21:57:06 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2008-11-02 21:57:06 -0500
commit67fda02dda290d614de233846fee434b3713b1dc (patch)
treec45cf35179244586ff9b3b3b9f87a520cae7ae5d /src/cpu/base.cc
parentc55a467a06eaa59c47c52a2adddc266b8e545589 (diff)
downloadgem5-67fda02dda290d614de233846fee434b3713b1dc.tar.xz
Make it so that all thread contexts are registered with the System, even in
SE. Process still keeps track of the tc's it owns, but registration occurs with the System, this eases the way for system-wide context Ids based on registration.
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 3e899d993..4845cbfaf 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -285,10 +285,9 @@ BaseCPU::registerThreadContexts()
for (int i = 0; i < threadContexts.size(); ++i) {
ThreadContext *tc = threadContexts[i];
-#if FULL_SYSTEM
system->registerThreadContext(tc);
-#else
- tc->getProcessPtr()->registerThreadContext(tc);
+#if !FULL_SYSTEM
+ tc->getProcessPtr()->assignThreadContext(tc->cpuId());
#endif
}
}
@@ -330,12 +329,7 @@ BaseCPU::takeOverFrom(BaseCPU *oldCPU, Port *ic, Port *dc)
CpuEvent::replaceThreadContext(oldTC, newTC);
assert(newTC->cpuId() == oldTC->cpuId());
-#if FULL_SYSTEM
system->replaceThreadContext(newTC, newTC->cpuId());
-#else
- assert(newTC->getProcessPtr() == oldTC->getProcessPtr());
- newTC->getProcessPtr()->replaceThreadContext(newTC, newTC->cpuId());
-#endif
if (DTRACE(Context))
ThreadContext::compare(oldTC, newTC);