diff options
author | Josh Blum | 2009-11-03 13:01:48 -0800 |
---|---|---|
committer | Josh Blum | 2009-11-03 13:01:48 -0800 |
commit | 3e366411a75b47eff5f76c76beb1f3a47006f6c7 (patch) | |
tree | 51e514a84ce689fb64ff592b6fd59b26a73ee596 /gnuradio-core | |
parent | 058edee5b4d1423b7ad88a9748bec073ff4963ff (diff) | |
download | gnuradio-3e366411a75b47eff5f76c76beb1f3a47006f6c7.tar.gz gnuradio-3e366411a75b47eff5f76c76beb1f3a47006f6c7.tar.bz2 gnuradio-3e366411a75b47eff5f76c76beb1f3a47006f6c7.zip |
fixed fixme in gr_top_block_impl
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block_impl.cc | 6 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block_impl.h | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc index 50d480d00..9cad687fb 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc +++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.cc @@ -90,7 +90,7 @@ gr_top_block_impl::~gr_top_block_impl() void gr_top_block_impl::start() { - gr_lock_guard l(d_mutex); + gruel::scoped_lock l(d_mutex); if (d_state != IDLE) throw std::runtime_error("top_block::start: top block already running or wait() not called after previous stop()"); @@ -131,14 +131,14 @@ gr_top_block_impl::wait() void gr_top_block_impl::lock() { - gr_lock_guard lock(d_mutex); + gruel::scoped_lock lock(d_mutex); d_lock_count++; } void gr_top_block_impl::unlock() { - gr_lock_guard lock(d_mutex); + gruel::scoped_lock lock(d_mutex); if (d_lock_count <= 0){ d_lock_count = 0; // fix it, then complain diff --git a/gnuradio-core/src/lib/runtime/gr_top_block_impl.h b/gnuradio-core/src/lib/runtime/gr_top_block_impl.h index 35fb44ef9..ef28dd829 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block_impl.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block_impl.h @@ -24,10 +24,7 @@ #define INCLUDED_GR_TOP_BLOCK_IMPL_H #include <gr_scheduler.h> -#include <boost/thread.hpp> - -typedef boost::mutex gr_mutex; // FIXME move these elsewhere -typedef boost::lock_guard<boost::mutex> gr_lock_guard; +#include <gruel/thread.h> /*! *\brief Abstract implementation details of gr_top_block @@ -69,7 +66,7 @@ protected: gr_flat_flowgraph_sptr d_ffg; gr_scheduler_sptr d_scheduler; - gr_mutex d_mutex; // protects d_state and d_lock_count + gruel::mutex d_mutex; // protects d_state and d_lock_count tb_state d_state; int d_lock_count; |