From 2113b21996d086dab32b9fd388efe3df241bfbd2 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Sun, 3 Jun 2018 13:10:26 +0100 Subject: misc: Substitute pointer to Request with aliased RequestPtr Every usage of Request* in the code has been replaced with the RequestPtr alias. This is a preparing patch for when RequestPtr will be the typdefed to a smart pointer to Request rather then a raw pointer to Request. Change-Id: I73cbaf2d96ea9313a590cdc731a25662950cd51a Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/10995 Reviewed-by: Anthony Gutierrez Reviewed-by: Daniel Carvalho Maintainer: Anthony Gutierrez --- src/mem/abstract_mem.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mem/abstract_mem.hh') diff --git a/src/mem/abstract_mem.hh b/src/mem/abstract_mem.hh index b57f73b4a..29c8c3f3e 100644 --- a/src/mem/abstract_mem.hh +++ b/src/mem/abstract_mem.hh @@ -79,12 +79,12 @@ class LockedAddr { static Addr mask(Addr paddr) { return (paddr & ~Addr_Mask); } // check for matching execution context - bool matchesContext(Request *req) const + bool matchesContext(RequestPtr req) const { return (contextId == req->contextId()); } - LockedAddr(Request *req) : addr(mask(req->getPaddr())), + LockedAddr(RequestPtr req) : addr(mask(req->getPaddr())), contextId(req->contextId()) {} @@ -140,7 +140,7 @@ class AbstractMemory : public MemObject // this method must be called on *all* stores since even // non-conditional stores must clear any matching lock addresses. bool writeOK(PacketPtr pkt) { - Request *req = pkt->req; + RequestPtr req = pkt->req; if (lockedAddrList.empty()) { // no locked addrs: nothing to check, store_conditional fails bool isLLSC = pkt->isLLSC(); -- cgit v1.2.3