Deleted Added
sdiff udiff text old ( 10301:44839e8febbd ) new ( 10348:c91b23c72d5e )
full compact
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
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;

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

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <cassert>
30
31#include "base/cprintf.hh"
32#include "base/misc.hh"
33#include "base/stl_helpers.hh"
34#include "debug/RubyQueue.hh"
35#include "mem/ruby/network/MessageBuffer.hh"
36#include "mem/ruby/system/System.hh"
37
38using namespace std;
39using m5::stl_helpers::operator<<;
40

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

128 return msg_ptr;
129}
130
131// FIXME - move me somewhere else
132Cycles
133random_time()
134{
135 Cycles time(1);
136 time += Cycles(random() & 0x3); // [0...3]
137 if ((random() & 0x7) == 0) { // 1 in 8 chance
138 time += Cycles(100 + (random() % 0xf)); // 100 + [1...15]
139 }
140 return time;
141}
142
143void
144MessageBuffer::enqueue(MsgPtr message, Cycles delta)
145{
146 m_msg_counter++;

--- 276 unchanged lines hidden ---