assert(transmitList.size() != reqQueueLimit);
- transmitList.push_back(DeferredPacket(pkt, when));
+ transmitList.emplace_back(DeferredPacket(pkt, when));
}
bridge.schedule(sendEvent, when);
}
- transmitList.push_back(DeferredPacket(pkt, when));
+ transmitList.emplace_back(DeferredPacket(pkt, when));
}
void
DPRINTF(HWPrefetch, "Prefetch queued. "
"addr:%#x tick:%lld.\n", pf_addr, pf_time);
- pfq.push_back(DeferredPacket(pf_time, pf_pkt));
+ pfq.emplace_back(DeferredPacket(pf_time, pf_pkt));
}
}
// note that currently we ignore a potentially outstanding retry
// and could in theory put a new packet at the head of the
// transmit list before retrying the existing packet
- transmitList.push_front(DeferredPacket(when, pkt));
+ transmitList.emplace_front(DeferredPacket(when, pkt));
schedSendEvent(when);
return;
}
// list is non-empty and this belongs at the end
if (when >= transmitList.back().tick) {
- transmitList.push_back(DeferredPacket(when, pkt));
+ transmitList.emplace_back(DeferredPacket(when, pkt));
return;
}
++i; // already checked for insertion at front
while (i != transmitList.end() && when >= i->tick)
++i;
- transmitList.insert(i, DeferredPacket(when, pkt));
+ transmitList.emplace(i, DeferredPacket(when, pkt));
}
void
schedSendEvent(deferredPacketReadyTime());
} else {
// put the packet back at the front of the list
- transmitList.push_front(dp);
+ transmitList.emplace_front(dp);
}
}
// to keep things simple (and in order), we put the packet at
// the end even if the latency suggests it should be sent
// before the packet(s) before it
- packetQueue.push_back(DeferredPacket(pkt, curTick() + getLatency()));
+ packetQueue.emplace_back(DeferredPacket(pkt, curTick() + getLatency()));
if (!retryResp && !dequeueEvent.scheduled())
schedule(dequeueEvent, packetQueue.back().tick);
} else {