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/base_dyn_inst.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpu/base_dyn_inst.hh') diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh index 5b54679c9..aae3af495 100644 --- a/src/cpu/base_dyn_inst.hh +++ b/src/cpu/base_dyn_inst.hh @@ -460,7 +460,7 @@ class BaseDynInst : public ExecContext, public RefCounted MasterID masterId() const { return cpu->dataMasterId(); } /** Read this context's system-wide ID **/ - int contextId() const { return thread->contextId(); } + ContextID contextId() const { return thread->contextId(); } /** Returns the fault type. */ Fault getFault() const { return fault; } -- cgit v1.2.3