summaryrefslogtreecommitdiff
path: root/src/cpu/simple_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/simple_thread.cc')
-rw-r--r--src/cpu/simple_thread.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 5c6b729b6..af0bb4490 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -183,6 +183,7 @@ SimpleThread::copyState(ThreadContext *oldContext)
#endif
inst = oldContext->getInst();
+ _threadId = oldContext->threadId();
_contextId = oldContext->contextId();
}
@@ -221,14 +222,14 @@ SimpleThread::activate(int delay)
lastActivate = curTick;
// if (status() == ThreadContext::Unallocated) {
-// cpu->activateWhenReady(tid);
+// cpu->activateWhenReady(_threadId);
// return;
// }
_status = ThreadContext::Active;
// status() == Suspended
- cpu->activateContext(tid, delay);
+ cpu->activateContext(_threadId, delay);
}
void
@@ -249,7 +250,7 @@ SimpleThread::suspend()
#endif
*/
_status = ThreadContext::Suspended;
- cpu->suspendContext(tid);
+ cpu->suspendContext(_threadId);
}
void
@@ -259,7 +260,7 @@ SimpleThread::deallocate()
return;
_status = ThreadContext::Unallocated;
- cpu->deallocateContext(tid);
+ cpu->deallocateContext(_threadId);
}
void
@@ -269,7 +270,7 @@ SimpleThread::halt()
return;
_status = ThreadContext::Halted;
- cpu->haltContext(tid);
+ cpu->haltContext(_threadId);
}