From 8ba73da056ae8b34713dc5b927d4ceb238db969a Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Tue, 7 Nov 2006 14:25:54 -0500 Subject: 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 --- src/mem/bus.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mem/bus.cc') 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; } } -- cgit v1.2.3