summaryrefslogtreecommitdiff
path: root/src/mem/tport.cc
diff options
context:
space:
mode:
authorTimothy M. Jones <tjones1@inf.ed.ac.uk>2010-07-22 18:54:37 +0100
committerTimothy M. Jones <tjones1@inf.ed.ac.uk>2010-07-22 18:54:37 +0100
commit28a5ea3f999d012be616395f9b396ce341882bb7 (patch)
tree805097c5c1e0170de0bc7364b3bf85cd488600c5 /src/mem/tport.cc
parente50a880297f13817200f4e74272ad1cf3194d401 (diff)
downloadgem5-28a5ea3f999d012be616395f9b396ce341882bb7.tar.xz
Port: Only indicate that a SimpleTimingPort is drained if its send event is
not scheduled, as well as the transmit list being empty.
Diffstat (limited to 'src/mem/tport.cc')
-rw-r--r--src/mem/tport.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/tport.cc b/src/mem/tport.cc
index e981a7445..4e89544e3 100644
--- a/src/mem/tport.cc
+++ b/src/mem/tport.cc
@@ -155,7 +155,7 @@ SimpleTimingPort::sendDeferredPacket()
schedule(sendEvent, time <= curTick ? curTick+1 : time);
}
- if (transmitList.empty() && drainEvent) {
+ if (transmitList.empty() && drainEvent && !sendEvent->scheduled()) {
drainEvent->process();
drainEvent = NULL;
}
@@ -195,7 +195,7 @@ SimpleTimingPort::processSendEvent()
unsigned int
SimpleTimingPort::drain(Event *de)
{
- if (transmitList.size() == 0)
+ if (transmitList.size() == 0 && !sendEvent->scheduled())
return 0;
drainEvent = de;
return 1;