Deleted Added
sdiff udiff text old ( 8975:7f36d4436074 ) new ( 9152:86c0e6ca5e7c )
full compact
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 27 unchanged lines hidden (view full) ---

36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 * Authors: Ali Saidi
41 * Andreas Hansson
42 */
43
44#include "debug/PacketQueue.hh"
45#include "mem/packet_queue.hh"
46
47using namespace std;
48
49PacketQueue::PacketQueue(EventManager& _em, const std::string& _label)
50 : em(_em), sendEvent(this), drainEvent(NULL), label(_label),
51 waitingOnRetry(false)

--- 111 unchanged lines hidden (view full) ---

163
164 if (nextReady != MaxTick) {
165 // if the sendTiming caused someone else to call our
166 // recvTiming we could already have an event scheduled, check
167 if (!sendEvent.scheduled())
168 em.schedule(&sendEvent, std::max(nextReady, curTick() + 1));
169 } else {
170 // no more to send, so if we're draining, we may be done
171 if (drainEvent && !sendEvent.scheduled()) {
172 drainEvent->process();
173 drainEvent = NULL;
174 }
175 }
176}
177
178void
179PacketQueue::sendDeferredPacket()

--- 16 unchanged lines hidden (view full) ---

196 sendDeferredPacket();
197}
198
199unsigned int
200PacketQueue::drain(Event *de)
201{
202 if (transmitList.empty() && !sendEvent.scheduled())
203 return 0;
204 drainEvent = de;
205 return 1;
206}
207
208MasterPacketQueue::MasterPacketQueue(EventManager& _em, MasterPort& _masterPort,
209 const std::string _label)
210 : PacketQueue(_em, _label), masterPort(_masterPort)
211{

--- 25 unchanged lines hidden ---