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/sim/system.hh | |
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/sim/system.hh')
-rw-r--r-- | src/sim/system.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sim/system.hh b/src/sim/system.hh index f67d39c67..26cac714b 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -89,6 +89,11 @@ class System : public SimObject std::vector<ThreadContext *> threadContexts; int numcpus; + ThreadContext * getThreadContext(int tid) + { + return threadContexts[tid]; + } + int getNumCPUs() { if (numcpus != threadContexts.size()) @@ -220,7 +225,7 @@ class System : public SimObject #endif // FULL_SYSTEM int registerThreadContext(ThreadContext *tc); - void replaceThreadContext(ThreadContext *tc, int tcIndex); + void replaceThreadContext(ThreadContext *tc, int context_id); void serialize(std::ostream &os); void unserialize(Checkpoint *cp, const std::string §ion); |