summaryrefslogtreecommitdiff
path: root/src/sim/system.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/sim/system.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/sim/system.cc')
-rw-r--r--src/sim/system.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 41075e9d0..8f25b4bb8 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -208,22 +208,24 @@ System::registerThreadContext(ThreadContext *tc)
void
System::startup()
{
+#if FULL_SYSTEM
int i;
for (i = 0; i < threadContexts.size(); i++)
TheISA::startupCPU(threadContexts[i], i);
+#endif
}
void
-System::replaceThreadContext(ThreadContext *tc, int id)
+System::replaceThreadContext(ThreadContext *tc, int context_id)
{
- if (id >= threadContexts.size()) {
+ if (context_id >= threadContexts.size()) {
panic("replaceThreadContext: bad id, %d >= %d\n",
- id, threadContexts.size());
+ context_id, threadContexts.size());
}
- threadContexts[id] = tc;
- if (id < remoteGDB.size())
- remoteGDB[id]->replaceThreadContext(tc);
+ threadContexts[context_id] = tc;
+ if (context_id < remoteGDB.size())
+ remoteGDB[context_id]->replaceThreadContext(tc);
}
#if !FULL_SYSTEM