summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2015-08-07 09:59:13 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2015-08-07 09:59:13 +0100
commit53e777d6838ac3ca80e6557626f9e99fd93dd0f7 (patch)
tree9029d3e7f1e158beac24761f2c9c690b3918d734 /src/base
parent3e26756f1dfe1ddd1d7f5e458771c9bf79acb09a (diff)
downloadgem5-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/base')
-rw-r--r--src/base/types.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/base/types.hh b/src/base/types.hh
index 3d53e6ba0..bc5c715ce 100644
--- a/src/base/types.hh
+++ b/src/base/types.hh
@@ -181,6 +181,10 @@ const Addr MaxAddr = (Addr)-1;
typedef int16_t ThreadID;
const ThreadID InvalidThreadID = (ThreadID)-1;
+/** Globally unique thread context ID */
+typedef int ContextID;
+const ContextID InvalidContextID = (ContextID)-1;
+
/**
* Port index/ID type, and a symbolic name for an invalid port id.
*/