summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-05-26 09:23:13 -0700
committerNathan Binkert <nate@binkert.org>2009-05-26 09:23:13 -0700
commit47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca (patch)
tree6beb00dfe7e31b9bf82f7aba4710b0c487b6543f /src/cpu/thread_state.hh
parentd93392df28fc6c9a5c70fb6252a12afdc72d9344 (diff)
downloadgem5-47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca.tar.xz
types: add a type for thread IDs and try to use it everywhere
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index dbae85998..525ecca86 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -66,9 +66,9 @@ struct ThreadState {
typedef ThreadContext::Status Status;
#if FULL_SYSTEM
- ThreadState(BaseCPU *cpu, int _tid);
+ ThreadState(BaseCPU *cpu, ThreadID _tid);
#else
- ThreadState(BaseCPU *cpu, int _tid, Process *_process, short _asid);
+ ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process, short _asid);
#endif
~ThreadState();
@@ -83,9 +83,9 @@ struct ThreadState {
void setContextId(int id) { _contextId = id; }
- void setThreadId(int id) { _threadId = id; }
+ void setThreadId(ThreadID id) { _threadId = id; }
- int threadId() { return _threadId; }
+ ThreadID threadId() { return _threadId; }
Tick readLastActivate() { return lastActivate; }
@@ -176,7 +176,7 @@ struct ThreadState {
int _contextId;
// Index of hardware thread context on the CPU that this represents.
- int _threadId;
+ ThreadID _threadId;
public:
/** Last time activate was called on this thread. */