diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
commit | 6f1187943cf78c2fd0334bd7e4372ae79a587fa4 (patch) | |
tree | 8d0eac2e2f4d55d48245266d3930ad4e7f92030f /src/mem/bridge.cc | |
parent | c22be9f2f016872b05d65c82055ddc936b4aa075 (diff) | |
download | gem5-6f1187943cf78c2fd0334bd7e4372ae79a587fa4.tar.xz |
Replace curTick global variable with accessor functions.
This step makes it easy to replace the accessor functions
(which still access a global variable) with ones that access
per-thread curTick values.
Diffstat (limited to 'src/mem/bridge.cc')
-rw-r--r-- | src/mem/bridge.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc index 668b492e8..4b8325088 100644 --- a/src/mem/bridge.cc +++ b/src/mem/bridge.cc @@ -158,7 +158,7 @@ Bridge::BridgePort::nackRequest(PacketPtr pkt) pkt->setNacked(); //put it on the list to send - Tick readyTime = curTick + nackDelay; + Tick readyTime = curTick() + nackDelay; PacketBuffer *buf = new PacketBuffer(pkt, readyTime, true); // nothing on the list, add it and we're done @@ -221,7 +221,7 @@ Bridge::BridgePort::queueForSendTiming(PacketPtr pkt) - Tick readyTime = curTick + delay; + Tick readyTime = curTick() + delay; PacketBuffer *buf = new PacketBuffer(pkt, readyTime); // If we're about to put this packet at the head of the queue, we @@ -241,7 +241,7 @@ Bridge::BridgePort::trySend() PacketBuffer *buf = sendQueue.front(); - assert(buf->ready <= curTick); + assert(buf->ready <= curTick()); PacketPtr pkt = buf->pkt; @@ -283,7 +283,7 @@ Bridge::BridgePort::trySend() if (!sendQueue.empty()) { buf = sendQueue.front(); DPRINTF(BusBridge, "Scheduling next send\n"); - schedule(sendEvent, std::max(buf->ready, curTick + 1)); + schedule(sendEvent, std::max(buf->ready, curTick() + 1)); } } else { DPRINTF(BusBridge, " unsuccessful\n"); @@ -301,7 +301,7 @@ Bridge::BridgePort::recvRetry() { inRetry = false; Tick nextReady = sendQueue.front()->ready; - if (nextReady <= curTick) + if (nextReady <= curTick()) trySend(); else schedule(sendEvent, nextReady); |