projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38646d4
)
mem: Check return value of checkFunctional in SimpleMemory
author
Andreas Hansson
<andreas.hansson@arm.com>
Fri, 19 Sep 2014 14:35:06 +0000
(10:35 -0400)
committer
Andreas Hansson
<andreas.hansson@arm.com>
Fri, 19 Sep 2014 14:35:06 +0000
(10:35 -0400)
Simple fix to ensure we only iterate until we are done.
src/mem/simple_mem.cc
patch
|
blob
|
history
diff --git
a/src/mem/simple_mem.cc
b/src/mem/simple_mem.cc
index 2549cbe3990a1b2641026aa23d07fcbc45acebdd..b2d518dc76442f31f18a910ab03b5f905b6ae60a 100644
(file)
--- a/
src/mem/simple_mem.cc
+++ b/
src/mem/simple_mem.cc
@@
-80,9
+80,13
@@
SimpleMemory::recvFunctional(PacketPtr pkt)
functionalAccess(pkt);
+ bool done = false;
+ auto p = packetQueue.begin();
// potentially update the packets in our packet queue as well
- for (auto i = packetQueue.begin(); i != packetQueue.end(); ++i)
- pkt->checkFunctional(i->pkt);
+ while (!done && p != packetQueue.end()) {
+ done = pkt->checkFunctional(p->pkt);
+ ++p;
+ }
pkt->popLabel();
}