summaryrefslogtreecommitdiff
path: root/src/mem/cache/cache_impl.hh
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/mem/cache/cache_impl.hh
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/mem/cache/cache_impl.hh')
-rw-r--r--src/mem/cache/cache_impl.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 62ab49538..dea95d955 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -332,7 +332,8 @@ Cache::access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat,
return false;
}
- int id = pkt->req->hasContextId() ? pkt->req->contextId() : -1;
+ ContextID id = pkt->req->hasContextId() ?
+ pkt->req->contextId() : InvalidContextID;
// Here lat is the value passed as parameter to accessBlock() function
// that can modify its value.
blk = tags->accessBlock(pkt->getAddr(), pkt->isSecure(), lat, id);