summaryrefslogtreecommitdiff
path: root/src/mem/bus.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-11-07 14:25:54 -0500
committerKevin Lim <ktlim@umich.edu>2006-11-07 14:25:54 -0500
commit8ba73da056ae8b34713dc5b927d4ceb238db969a (patch)
treed374baa289829a81a33f2e6c0f8de840cce27f8b /src/mem/bus.cc
parent244e0c884c60c141ea1bc63bb93e0aee25d6a854 (diff)
downloadgem5-8ba73da056ae8b34713dc5b927d4ceb238db969a.tar.xz
Fix up bus draining and add draining to the caches.
src/mem/bus.cc: Fix up draining to work properly. src/mem/bus.hh: Initialize drainEvent to NULL. src/mem/cache/base_cache.cc: src/mem/cache/base_cache.hh: Add draining to the caches. --HG-- extra : convert_revision : 3082220a75d50876f10909f9f99bec535889f818
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r--src/mem/bus.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index 28ee3476b..7b65d252b 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -240,10 +240,10 @@ Bus::recvRetry(int id)
busIdle.reschedule(tickNextIdle);
}
}
- //If we weren't able to drain before, we might be able to now.
- if (drainEvent && retryList.size() == 0 && curTick >= tickNextIdle)
- drainEvent->process();
}
+ //If we weren't able to drain before, we might be able to now.
+ if (drainEvent && retryList.size() == 0 && curTick >= tickNextIdle)
+ drainEvent->process();
}
Port *
@@ -521,10 +521,10 @@ Bus::drain(Event * de)
//waiting. We might be idle but have someone waiting if the device we
//contacted for a retry didn't actually retry.
if (curTick >= tickNextIdle && retryList.size() == 0) {
+ return 0;
+ } else {
drainEvent = de;
return 1;
- } else {
- return 0;
}
}