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.
This commit is contained in:
Steve Reinhardt
2011-01-07 21:50:29 -08:00
parent c22be9f2f0
commit 6f1187943c
129 changed files with 515 additions and 509 deletions

View File

@@ -154,7 +154,7 @@ EtherLink::Link::txDone()
if (linkDelay > 0) {
DPRINTF(Ethernet, "packet delayed: delay=%d\n", linkDelay);
Event *event = new LinkDelayEvent(this, packet);
parent->schedule(event, curTick + linkDelay);
parent->schedule(event, curTick() + linkDelay);
} else {
txComplete(packet);
}
@@ -183,7 +183,7 @@ EtherLink::Link::transmit(EthPacketPtr pkt)
DPRINTF(Ethernet, "scheduling packet: delay=%d, (rate=%f)\n",
delay, ticksPerByte);
parent->schedule(doneEvent, curTick + delay);
parent->schedule(doneEvent, curTick() + delay);
return true;
}