Merge branch 'wip/howto' of git@gnuradio.org:jcorgan
authorJohnathan Corgan <jcorgan@corganenterprises.com>
Tue, 3 Nov 2009 22:24:43 +0000 (14:24 -0800)
committerJohnathan Corgan <jcorgan@corganenterprises.com>
Tue, 3 Nov 2009 22:24:43 +0000 (14:24 -0800)
* 'wip/howto' of git@gnuradio.org:jcorgan:
  howto: moved osbsolete docs directory into limbo
  howto: make swig directory use individual .i files
  howto: reorganized directory structure
  howto: implement dynamic versioning
  howto: update m4 files to match latest master
  howto: updated INSTALL, fixed mode of config.*

gnuradio-core/src/lib/runtime/gr_top_block_impl.cc
gnuradio-core/src/lib/runtime/gr_top_block_impl.h

index 50d480d009e80875b02744740e84917837a33e0e..9cad687fb55f4f685fa4373564c072b5a265218f 100644 (file)
@@ -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
index 35fb44ef92ba7110c4c052e3c96d8a89573fcb8d..ef28dd8292124803f1162b85515b2313d4da0475 100644 (file)
 #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;