tport.cc (7064:586b0e3a12b3) | tport.cc (7510:fb7fc9aca918) |
---|---|
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; --- 141 unchanged lines hidden (view full) --- 150 bool success = sendTiming(dp.pkt); 151 152 if (success) { 153 if (!transmitList.empty() && !sendEvent->scheduled()) { 154 Tick time = transmitList.front().tick; 155 schedule(sendEvent, time <= curTick ? curTick+1 : time); 156 } 157 | 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; --- 141 unchanged lines hidden (view full) --- 150 bool success = sendTiming(dp.pkt); 151 152 if (success) { 153 if (!transmitList.empty() && !sendEvent->scheduled()) { 154 Tick time = transmitList.front().tick; 155 schedule(sendEvent, time <= curTick ? curTick+1 : time); 156 } 157 |
158 if (transmitList.empty() && drainEvent) { | 158 if (transmitList.empty() && drainEvent && !sendEvent->scheduled()) { |
159 drainEvent->process(); 160 drainEvent = NULL; 161 } 162 } else { 163 // Unsuccessful, need to put back on transmitList. Callee 164 // should not have messed with it (since it didn't accept that 165 // packet), so we can just push it back on the front. 166 assert(!sendEvent->scheduled()); --- 23 unchanged lines hidden (view full) --- 190 assert(!waitingOnRetry); 191 sendDeferredPacket(); 192} 193 194 195unsigned int 196SimpleTimingPort::drain(Event *de) 197{ | 159 drainEvent->process(); 160 drainEvent = NULL; 161 } 162 } else { 163 // Unsuccessful, need to put back on transmitList. Callee 164 // should not have messed with it (since it didn't accept that 165 // packet), so we can just push it back on the front. 166 assert(!sendEvent->scheduled()); --- 23 unchanged lines hidden (view full) --- 190 assert(!waitingOnRetry); 191 sendDeferredPacket(); 192} 193 194 195unsigned int 196SimpleTimingPort::drain(Event *de) 197{ |
198 if (transmitList.size() == 0) | 198 if (transmitList.size() == 0 && !sendEvent->scheduled()) |
199 return 0; 200 drainEvent = de; 201 return 1; 202} | 199 return 0; 200 drainEvent = de; 201 return 1; 202} |