From 86b1c0fd540b57c1e7bba948ad0417f22f90eb41 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 18 Sep 2012 22:46:34 -0500 Subject: ruby: avoid using g_system_ptr for event scheduling This patch removes the use of g_system_ptr for event scheduling. Each consumer object now needs to specify upfront an EventManager object it would use for scheduling events. This makes the ruby memory system more amenable for a multi-threaded simulation. --- src/mem/ruby/network/simple/Switch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mem/ruby/network/simple/Switch.cc') diff --git a/src/mem/ruby/network/simple/Switch.cc b/src/mem/ruby/network/simple/Switch.cc index 922807a0b..42a4efae3 100644 --- a/src/mem/ruby/network/simple/Switch.cc +++ b/src/mem/ruby/network/simple/Switch.cc @@ -74,7 +74,8 @@ Switch::addOutPort(const vector& out, // Create a throttle throttle_ptr = new Throttle(m_switch_id, m_throttles.size(), link_latency, - bw_multiplier, net_ptr->getEndpointBandwidth()); + bw_multiplier, net_ptr->getEndpointBandwidth(), + net_ptr); m_throttles.push_back(throttle_ptr); // Create one buffer per vnet (these are intermediaryQueues) @@ -214,4 +215,3 @@ Switch::print(std::ostream& out) const // FIXME printing out << "[Switch]"; } - -- cgit v1.2.3