diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-28 14:58:30 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-02-15 11:12:54 -0800 |
commit | 5758533839a411906f70e29975a9e9ad2926fe89 (patch) | |
tree | 1f67b3e3328e0d872ed937a02f778ebcc3ec7822 /host | |
parent | 3d726342ff5f0eef8c82496c0d0df771c715cfd0 (diff) | |
download | uhd-5758533839a411906f70e29975a9e9ad2926fe89.tar.gz uhd-5758533839a411906f70e29975a9e9ad2926fe89.tar.bz2 uhd-5758533839a411906f70e29975a9e9ad2926fe89.zip |
b200_cores: Replace usage of boost::mutex with std::mutex
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/b200/b200_cores.cpp | 5 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_cores.hpp | 5 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_io_impl.cpp | 4 |
4 files changed, 10 insertions, 7 deletions
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 <mutex> 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<std::mutex> 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<std::mutex> 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 <uhd/utils/noncopyable.hpp> #include <uhdlib/usrp/cores/spi_core_3000.hpp> #include <uhdlib/usrp/common/adf4001_ctrl.hpp> -#include <boost/thread/mutex.hpp> +#include <boost/shared_ptr.hpp> +#include <mutex> 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 <uhdlib/usrp/common/adf4001_ctrl.hpp> #include <boost/assign.hpp> #include <boost/weak_ptr.hpp> +#include <mutex> 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<uhd::rx_streamer> _rx_streamer; boost::weak_ptr<uhd::tx_streamer> _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<uhd::msg_task::msg_type_t> 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<std::mutex> 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<std::mutex> lock(_transport_setup_mutex); stream_args_t args = args_; |