From e40e8c27efeb1c09f4e9f20989274e53fcbc602a Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Fri, 24 Jan 2014 14:01:53 +0100
Subject: uhd: Fix possible freeze-up when using lock/unlock (Solution by
 Johannes Demel)

---
 gr-uhd/lib/usrp_source_impl.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'gr-uhd/lib/usrp_source_impl.h')

diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h
index 58bb21551c..3cfa1aad35 100644
--- a/gr-uhd/lib/usrp_source_impl.h
+++ b/gr-uhd/lib/usrp_source_impl.h
@@ -22,6 +22,7 @@
 
 #include <gnuradio/uhd/usrp_source.h>
 #include <uhd/convert.hpp>
+#include <boost/thread/mutex.hpp>
 
 static const pmt::pmt_t TIME_KEY = pmt::string_to_symbol("rx_time");
 static const pmt::pmt_t RATE_KEY = pmt::string_to_symbol("rx_rate");
@@ -121,7 +122,7 @@ namespace gr {
       int work(int noutput_items,
                gr_vector_const_void_star &input_items,
                gr_vector_void_star &output_items);
- 
+
     private:
       ::uhd::usrp::multi_usrp::sptr _dev;
       const ::uhd::stream_args_t _stream_args;
@@ -142,6 +143,8 @@ namespace gr {
       //tag shadows
       double _samp_rate;
       double _center_freq;
+
+      boost::recursive_mutex d_mutex;
     };
 
   } /* namespace uhd */
-- 
cgit v1.2.3