summaryrefslogtreecommitdiff
path: root/cpu/memtest
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2004-02-02 10:47:21 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2004-02-02 10:47:21 -0800
commit7b07b0877f05cffa93b782a76a15791c1126216a (patch)
tree9bc0cfd05f4f8bb0de7560c46e7bc144900e44e9 /cpu/memtest
parent7c8413db101e1f0c92b10aab7130b34fe888391d (diff)
downloadgem5-7b07b0877f05cffa93b782a76a15791c1126216a.tar.xz
Change MemReqPtr parameters to references.
This avoids incrementing and decrementing the MemReq reference counters on every call and return. arch/alpha/alpha_memory.cc: arch/alpha/alpha_memory.hh: cpu/exec_context.hh: cpu/memtest/memtest.cc: cpu/memtest/memtest.hh: dev/alpha_console.cc: dev/alpha_console.hh: Change MemReqPtr parameters to references. --HG-- extra : convert_revision : 3ba18bdd9f996563988402576bfdd3430e1ab1e5
Diffstat (limited to 'cpu/memtest')
-rw-r--r--cpu/memtest/memtest.cc2
-rw-r--r--cpu/memtest/memtest.hh4
2 files changed, 3 insertions, 3 deletions
diff --git a/cpu/memtest/memtest.cc b/cpu/memtest/memtest.cc
index db24bb507..4ec5eed59 100644
--- a/cpu/memtest/memtest.cc
+++ b/cpu/memtest/memtest.cc
@@ -119,7 +119,7 @@ printData(ostream &os, uint8_t *data, int nbytes)
}
void
-MemTest::completeRequest(MemReqPtr req, uint8_t *data)
+MemTest::completeRequest(MemReqPtr &req, uint8_t *data)
{
switch (req->cmd) {
case Read:
diff --git a/cpu/memtest/memtest.hh b/cpu/memtest/memtest.hh
index 3e7dff968..09f22a177 100644
--- a/cpu/memtest/memtest.hh
+++ b/cpu/memtest/memtest.hh
@@ -108,7 +108,7 @@ class MemTest : public BaseCPU
Statistics::Scalar<> numCopies;
// called by MemCompleteEvent::process()
- void completeRequest(MemReqPtr req, uint8_t *data);
+ void completeRequest(MemReqPtr &req, uint8_t *data);
friend class MemCompleteEvent;
};
@@ -122,7 +122,7 @@ class MemCompleteEvent : public Event
public:
- MemCompleteEvent(MemReqPtr _req, uint8_t *_data, MemTest *_tester)
+ MemCompleteEvent(MemReqPtr &_req, uint8_t *_data, MemTest *_tester)
: Event(&mainEventQueue),
req(_req), data(_data), tester(_tester)
{