From 5758533839a411906f70e29975a9e9ad2926fe89 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 28 Jan 2019 14:58:30 +0100 Subject: b200_cores: Replace usage of boost::mutex with std::mutex --- host/lib/usrp/b200/b200_cores.cpp | 5 +++-- host/lib/usrp/b200/b200_cores.hpp | 5 +++-- host/lib/usrp/b200/b200_impl.hpp | 3 ++- host/lib/usrp/b200/b200_io_impl.cpp | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/b200/b200_cores.cpp b/host/lib/usrp/b200/b200_cores.cpp index 010c012a6..688af2535 100644 --- a/host/lib/usrp/b200/b200_cores.cpp +++ b/host/lib/usrp/b200/b200_cores.cpp @@ -8,6 +8,7 @@ #include "b200_cores.hpp" #include "b200_regs.hpp" #include "b200_impl.hpp" +#include b200_local_spi_core::b200_local_spi_core( uhd::wb_iface::sptr iface, @@ -26,13 +27,13 @@ uint32_t b200_local_spi_core::transact_spi( size_t num_bits, bool readback) { - boost::mutex::scoped_lock lock(_mutex); + std::lock_guard lock(_mutex); return _spi_core->transact_spi(which_slave, config, data, num_bits, readback); } void b200_local_spi_core::change_perif(perif_t perif) { - boost::mutex::scoped_lock lock(_mutex); + std::lock_guard lock(_mutex); _last_perif = _current_perif; _current_perif = perif; diff --git a/host/lib/usrp/b200/b200_cores.hpp b/host/lib/usrp/b200/b200_cores.hpp index 7b5484831..7dabb66e9 100644 --- a/host/lib/usrp/b200/b200_cores.hpp +++ b/host/lib/usrp/b200/b200_cores.hpp @@ -12,7 +12,8 @@ #include #include #include -#include +#include +#include class b200_local_spi_core : uhd::noncopyable, public uhd::spi_iface { @@ -41,7 +42,7 @@ private: spi_core_3000::sptr _spi_core; perif_t _current_perif; perif_t _last_perif; - boost::mutex _mutex; + std::mutex _mutex; }; class b200_ref_pll_ctrl : public uhd::usrp::adf4001_ctrl { diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 3c562f8b3..95fbe6ad2 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -38,6 +38,7 @@ #include #include #include +#include static const uint8_t B200_FW_COMPAT_NUM_MAJOR = 8; static const uint8_t B200_FW_COMPAT_NUM_MINOR = 0; @@ -149,7 +150,7 @@ private: boost::weak_ptr _rx_streamer; boost::weak_ptr _tx_streamer; - boost::mutex _transport_setup_mutex; + std::mutex _transport_setup_mutex; //async ctrl + msgs uhd::msg_task::sptr _async_task; diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 69797017b..5a0de430f 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -391,7 +391,7 @@ boost::optional b200_impl::handle_async_task( **********************************************************************/ rx_streamer::sptr b200_impl::get_rx_stream(const uhd::stream_args_t& args_) { - boost::mutex::scoped_lock lock(_transport_setup_mutex); + std::lock_guard lock(_transport_setup_mutex); stream_args_t args = args_; @@ -513,7 +513,7 @@ void b200_impl::handle_overflow(const size_t radio_index) **********************************************************************/ tx_streamer::sptr b200_impl::get_tx_stream(const uhd::stream_args_t& args_) { - boost::mutex::scoped_lock lock(_transport_setup_mutex); + std::lock_guard lock(_transport_setup_mutex); stream_args_t args = args_; -- cgit v1.2.3