inorder-smt: remove hardcoded values
authorSoumyaroop Roy <sroy@cse.usf.edu>
Wed, 16 Sep 2009 13:47:38 +0000 (09:47 -0400)
committerSoumyaroop Roy <sroy@cse.usf.edu>
Wed, 16 Sep 2009 13:47:38 +0000 (09:47 -0400)
allows for the 2T hello world example to work in inorder model

src/cpu/inorder/thread_state.hh

index 0571b6e04e20df55a1f76b63b756f2b4b49665e3..422df30aa13634f8d52bdb3181c1097f9d66674f 100644 (file)
@@ -78,13 +78,13 @@ class InOrderThreadState : public ThreadState {
 
 #if FULL_SYSTEM
     InOrderThreadState(InOrderCPU *_cpu, ThreadID _thread_num)
-        : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), 0/*_thread_num*/),
+        : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), _thread_num),
           cpu(_cpu), inSyscall(0), trapPending(0)
     { }
 #else
     InOrderThreadState(InOrderCPU *_cpu, ThreadID _thread_num,
                        Process *_process)
-        : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), 0/*_thread_num*/,
+        : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), _thread_num,
                       _process),
           cpu(_cpu), inSyscall(0), trapPending(0)
     { }
@@ -105,7 +105,7 @@ class InOrderThreadState : public ThreadState {
     /** Returns a pointer to the TC of this thread. */
     ThreadContext *getTC() { return tc; }
 
-  int readTid() { return 0; }
+    int readTid() { return threadId(); }
 
     /** Pointer to the last graduated instruction in the thread */
     //DynInstPtr lastGradInst;