diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-03-07 15:56:23 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-03-07 15:56:23 -0500 |
commit | 62fe81e9c1ab09f1b401231f58d9c34008c7b558 (patch) | |
tree | 732e6ac33b6be91999dfeb3b95f1d98746146b9d /src/cpu/thread_state.hh | |
parent | c4a8e5c36cbc30feee6ecd5c706e3275301b25ef (diff) | |
download | gem5-62fe81e9c1ab09f1b401231f58d9c34008c7b558.tar.xz |
cpu: Make CPU and ThreadContext getters const
This patch merely tidies up the CPU and ThreadContext getters by
making them const where appropriate.
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r-- | src/cpu/thread_state.hh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index d8dccc4ae..775f6fbd4 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -67,19 +67,19 @@ struct ThreadState { void unserialize(Checkpoint *cp, const std::string §ion); - int cpuId() { return baseCpu->cpuId(); } + int cpuId() const { return baseCpu->cpuId(); } - int contextId() { return _contextId; } + int contextId() const { return _contextId; } void setContextId(int id) { _contextId = id; } void setThreadId(ThreadID id) { _threadId = id; } - ThreadID threadId() { return _threadId; } + ThreadID threadId() const { return _threadId; } - Tick readLastActivate() { return lastActivate; } + Tick readLastActivate() const { return lastActivate; } - Tick readLastSuspend() { return lastSuspend; } + Tick readLastSuspend() const { return lastSuspend; } /** * Initialise the physical and virtual port proxies and tie them to |