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/base/types.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/base/types.hh') 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. */ -- cgit v1.2.3