From 4fdecae443c4f11d24b7da537b6f7a2baadbd130 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 31 Jan 2012 11:50:07 -0500 Subject: 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. --- src/cpu/simple_thread.hh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/cpu/simple_thread.hh') 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 *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; } -- cgit v1.2.3