diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-08-07 09:59:13 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-08-07 09:59:13 +0100 |
commit | 53e777d6838ac3ca80e6557626f9e99fd93dd0f7 (patch) | |
tree | 9029d3e7f1e158beac24761f2c9c690b3918d734 /src/cpu/thread_state.hh | |
parent | 3e26756f1dfe1ddd1d7f5e458771c9bf79acb09a (diff) | |
download | gem5-53e777d6838ac3ca80e6557626f9e99fd93dd0f7.tar.xz |
base: Declare a type for context IDs
Context IDs used to be declared as ad hoc (usually as int). This
changeset introduces a typedef for ContextIDs and a constant for
invalid context IDs.
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r-- | src/cpu/thread_state.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index 485c9306f..bd471e13a 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -71,9 +71,9 @@ struct ThreadState : public Serializable { uint32_t socketId() const { return baseCpu->socketId(); } - int contextId() const { return _contextId; } + ContextID contextId() const { return _contextId; } - void setContextId(int id) { _contextId = id; } + void setContextId(ContextID id) { _contextId = id; } void setThreadId(ThreadID id) { _threadId = id; } @@ -153,7 +153,7 @@ struct ThreadState : public Serializable { BaseCPU *baseCpu; // system wide HW context id - int _contextId; + ContextID _contextId; // Index of hardware thread context on the CPU that this represents. ThreadID _threadId; |