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_context.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_context.hh')
-rw-r--r-- | src/cpu/thread_context.hh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index efd3cc800..4b88b4a0b 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -121,13 +121,13 @@ class ThreadContext virtual BaseCPU *getCpuPtr() = 0; - virtual int cpuId() = 0; + virtual int cpuId() const = 0; - virtual int threadId() = 0; + virtual int threadId() const = 0; virtual void setThreadId(int id) = 0; - virtual int contextId() = 0; + virtual int contextId() const = 0; virtual void setContextId(int id) = 0; @@ -321,13 +321,13 @@ class ProxyThreadContext : public ThreadContext BaseCPU *getCpuPtr() { return actualTC->getCpuPtr(); } - int cpuId() { return actualTC->cpuId(); } + int cpuId() const { return actualTC->cpuId(); } - int threadId() { return actualTC->threadId(); } + int threadId() const { return actualTC->threadId(); } - void setThreadId(int id) { return actualTC->setThreadId(id); } + void setThreadId(int id) { actualTC->setThreadId(id); } - int contextId() { return actualTC->contextId(); } + int contextId() const { return actualTC->contextId(); } void setContextId(int id) { actualTC->setContextId(id); } |