diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2008-11-02 21:57:06 -0500 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2008-11-02 21:57:06 -0500 |
commit | 67fda02dda290d614de233846fee434b3713b1dc (patch) | |
tree | c45cf35179244586ff9b3b3b9f87a520cae7ae5d /src/cpu/base.cc | |
parent | c55a467a06eaa59c47c52a2adddc266b8e545589 (diff) | |
download | gem5-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.cc | 10 |
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); |