summaryrefslogtreecommitdiff
path: root/src/cpu/simple_thread.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hanson@arm.com>2012-01-31 11:50:07 -0500
committerAndreas Hansson <andreas.hanson@arm.com>2012-01-31 11:50:07 -0500
commit4fdecae443c4f11d24b7da537b6f7a2baadbd130 (patch)
tree428e7864c689c6b28c854babd875424004dd2816 /src/cpu/simple_thread.hh
parent0ed3c84c7b05d7d3c9d5f0e3f1c05c20afef93b9 (diff)
downloadgem5-4fdecae443c4f11d24b7da537b6f7a2baadbd130.tar.xz
Thread: Use inherited baseCpu rather than cpu in SimpleThread
This patch is a trivial simplification, removing the cpu pointer from SimpleThread and relying on the baseCpu pointer in ThreadState. The patch does not add or change any functionality, it merely cleans up the code.
Diffstat (limited to 'src/cpu/simple_thread.hh')
-rw-r--r--src/cpu/simple_thread.hh7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index b8dae5d01..46ed92ce8 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -127,12 +127,9 @@ class SimpleThread : public ThreadState
public:
std::string name() const
{
- return csprintf("%s.[tid:%i]", cpu->name(), tc->threadId());
+ return csprintf("%s.[tid:%i]", baseCpu->name(), tc->threadId());
}
- // pointer to CPU associated with this SimpleThread
- BaseCPU *cpu;
-
ProxyThreadContext<SimpleThread> *tc;
System *system;
@@ -207,7 +204,7 @@ class SimpleThread : public ThreadState
* ThreadContext interface functions.
******************************************/
- BaseCPU *getCpuPtr() { return cpu; }
+ BaseCPU *getCpuPtr() { return baseCpu; }
TheISA::TLB *getITBPtr() { return itb; }