tport.cc (3605:ed3c5b4e8bca) tport.cc (3610:c0f97b22db1a)
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;

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

113 return;
114 }
115 // Something is on the list and this belongs somewhere else
116 std::list<std::pair<Tick,PacketPtr> >::iterator i = transmitList.begin();
117 std::list<std::pair<Tick,PacketPtr> >::iterator end = transmitList.end();
118 bool done = false;
119
120 while (i != end && !done) {
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;

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

113 return;
114 }
115 // Something is on the list and this belongs somewhere else
116 std::list<std::pair<Tick,PacketPtr> >::iterator i = transmitList.begin();
117 std::list<std::pair<Tick,PacketPtr> >::iterator end = transmitList.end();
118 bool done = false;
119
120 while (i != end && !done) {
121 if (time+curTick < i->first)
121 if (time+curTick < i->first) {
122 if (i == transmitList.begin()) {
123 //Inserting at begining, reschedule
124 sendEvent.reschedule(time+curTick);
125 }
122 transmitList.insert(i,std::pair<Tick,PacketPtr>(time+curTick,pkt));
126 transmitList.insert(i,std::pair<Tick,PacketPtr>(time+curTick,pkt));
127 done = true;
128 }
123 i++;
124 }
125}
126
127void
128SimpleTimingPort::SendEvent::process()
129{
130 assert(port->transmitList.size());

--- 28 unchanged lines hidden ---
129 i++;
130 }
131}
132
133void
134SimpleTimingPort::SendEvent::process()
135{
136 assert(port->transmitList.size());

--- 28 unchanged lines hidden ---