diff options
Diffstat (limited to 'lib/rtl/rtl_source_c.cc')
-rw-r--r-- | lib/rtl/rtl_source_c.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rtl/rtl_source_c.cc b/lib/rtl/rtl_source_c.cc index 5e3306b..a371464 100644 --- a/lib/rtl/rtl_source_c.cc +++ b/lib/rtl/rtl_source_c.cc @@ -32,6 +32,7 @@ #include <boost/assign.hpp> #include <boost/format.hpp> +#include <boost/detail/endian.hpp> #include <boost/algorithm/string.hpp> #include <stdexcept> @@ -297,7 +298,7 @@ void rtl_source_c::rtlsdr_callback(unsigned char *buf, uint32_t len) } { - std::lock_guard<std::mutex> lock( _buf_mutex ); + boost::mutex::scoped_lock lock( _buf_mutex ); int buf_tail = (_buf_head + _buf_used) % _buf_num; memcpy(_buf[buf_tail], buf, len); @@ -337,7 +338,7 @@ int rtl_source_c::work( int noutput_items, gr_complex *out = (gr_complex *)output_items[0]; { - std::unique_lock<std::mutex> lock( _buf_mutex ); + boost::mutex::scoped_lock lock( _buf_mutex ); while (_buf_used < 3 && _running) // collect at least 3 buffers _buf_cond.wait( lock ); @@ -358,7 +359,7 @@ int rtl_source_c::work( int noutput_items, if (!_samp_avail) { { - std::lock_guard<std::mutex> lock( _buf_mutex ); + boost::mutex::scoped_lock lock( _buf_mutex ); _buf_head = (_buf_head + 1) % _buf_num; _buf_used--; |