diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-08-07 09:59:13 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-08-07 09:59:13 +0100 |
commit | 53e777d6838ac3ca80e6557626f9e99fd93dd0f7 (patch) | |
tree | 9029d3e7f1e158beac24761f2c9c690b3918d734 /src/sim/process.hh | |
parent | 3e26756f1dfe1ddd1d7f5e458771c9bf79acb09a (diff) | |
download | gem5-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/sim/process.hh')
-rw-r--r-- | src/sim/process.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/process.hh b/src/sim/process.hh index 82a84a935..f509b81c7 100644 --- a/src/sim/process.hh +++ b/src/sim/process.hh @@ -75,7 +75,7 @@ class Process : public SimObject System *system; // thread contexts associated with this process - std::vector<int> contextIds; + std::vector<ContextID> contextIds; // number of CPUs (esxec contexts, really) assigned to this process. unsigned int numCpus() { return contextIds.size(); } @@ -160,7 +160,7 @@ class Process : public SimObject // After getting registered with system object, tell process which // system-wide context id it is assigned. - void assignThreadContext(int context_id) + void assignThreadContext(ContextID context_id) { contextIds.push_back(context_id); } |