From 53e777d6838ac3ca80e6557626f9e99fd93dd0f7 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 7 Aug 2015 09:59:13 +0100 Subject: 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. --- src/cpu/checker/thread_context.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpu/checker') diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh index 71c231ba0..5fcb82f6d 100644 --- a/src/cpu/checker/thread_context.hh +++ b/src/cpu/checker/thread_context.hh @@ -96,9 +96,9 @@ class CheckerThreadContext : public ThreadContext int cpuId() const { return actualTC->cpuId(); } - int contextId() const { return actualTC->contextId(); } + ContextID contextId() const { return actualTC->contextId(); } - void setContextId(int id) + void setContextId(ContextID id) { actualTC->setContextId(id); checkerTC->setContextId(id); -- cgit v1.2.3