Deleted Added
sdiff udiff text old ( 8232:b28d06a175be ) new ( 8259:36987780169e )
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;

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

44const int MESSAGE_SIZE_MULTIPLIER = 1000;
45//const int BROADCAST_SCALING = 4; // Have a 16p system act like a 64p systems
46const int BROADCAST_SCALING = 1;
47const int PRIORITY_SWITCH_LIMIT = 128;
48
49static int network_message_to_size(NetworkMessage* net_msg_ptr);
50
51Throttle::Throttle(int sID, NodeID node, int link_latency,
52 int link_bandwidth_multiplier)
53{
54 init(node, link_latency, link_bandwidth_multiplier);
55 m_sID = sID;
56}
57
58Throttle::Throttle(NodeID node, int link_latency,
59 int link_bandwidth_multiplier)
60{
61 init(node, link_latency, link_bandwidth_multiplier);
62 m_sID = 0;
63}
64
65void
66Throttle::init(NodeID node, int link_latency, int link_bandwidth_multiplier)
67{
68 m_node = node;
69 m_vnets = 0;
70
71 assert(link_bandwidth_multiplier > 0);
72 m_link_bandwidth_multiplier = link_bandwidth_multiplier;
73 m_link_latency = link_latency;
74
75 m_wakeups_wo_switch = 0;
76 clearStats();
77}
78
79void
80Throttle::clear()
81{

--- 190 unchanged lines hidden ---