tport.hh (8229:78bf55f23338) | tport.hh (8708:7ccbdea0fa12) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 92 unchanged lines hidden (view full) --- 101 102 /** Check whether we have a packet ready to go on the transmit list. */ 103 bool deferredPacketReady() 104 { return !transmitList.empty() && transmitList.front().tick <= curTick(); } 105 106 Tick deferredPacketReadyTime() 107 { return transmitList.empty() ? MaxTick : transmitList.front().tick; } 108 | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 92 unchanged lines hidden (view full) --- 101 102 /** Check whether we have a packet ready to go on the transmit list. */ 103 bool deferredPacketReady() 104 { return !transmitList.empty() && transmitList.front().tick <= curTick(); } 105 106 Tick deferredPacketReadyTime() 107 { return transmitList.empty() ? MaxTick : transmitList.front().tick; } 108 |
109 void 110 schedSendEvent(Tick when) 111 { 112 if (waitingOnRetry) { 113 assert(!sendEvent->scheduled()); 114 return; 115 } | 109 /** 110 * Schedule a send even if not already waiting for a retry. If the 111 * requested time is before an already scheduled send event it 112 * will be rescheduled. 113 * 114 * @param when 115 */ 116 void schedSendEvent(Tick when); |
116 | 117 |
117 if (!sendEvent->scheduled()) { 118 schedule(sendEvent, when); 119 } else if (sendEvent->when() > when) { 120 reschedule(sendEvent, when); 121 } 122 } 123 124 | |
125 /** Schedule a sendTiming() event to be called in the future. 126 * @param pkt packet to send 127 * @param absolute time (in ticks) to send packet 128 */ 129 void schedSendTiming(PacketPtr pkt, Tick when); 130 131 /** Attempt to send the packet at the head of the deferred packet 132 * list. Caller must guarantee that the deferred packet list is --- 46 unchanged lines hidden --- | 118 /** Schedule a sendTiming() event to be called in the future. 119 * @param pkt packet to send 120 * @param absolute time (in ticks) to send packet 121 */ 122 void schedSendTiming(PacketPtr pkt, Tick when); 123 124 /** Attempt to send the packet at the head of the deferred packet 125 * list. Caller must guarantee that the deferred packet list is --- 46 unchanged lines hidden --- |