aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-30 13:48:19 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-31 10:11:22 -0700
commit4b42ac06978aa2b3f5ca7f0e0fd7c024c749260c (patch)
tree0f90f8dc00a980463475f5a07ec688264d3d2963
parentbd7c0f67cf8aa166cf4e1314bd96858f78eeb8f9 (diff)
downloaduhd-4b42ac06978aa2b3f5ca7f0e0fd7c024c749260c.tar.gz
uhd-4b42ac06978aa2b3f5ca7f0e0fd7c024c749260c.tar.bz2
uhd-4b42ac06978aa2b3f5ca7f0e0fd7c024c749260c.zip
b100: Remove all Boostisms from fifo_ctrl_excelsior
-rw-r--r--host/lib/usrp/b100/fifo_ctrl_excelsior.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp b/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp
index ed278e6be..6eed5c813 100644
--- a/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp
+++ b/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp
@@ -15,7 +15,7 @@
#include <uhd/utils/thread.hpp>
#include <uhd/transport/vrt_if_packet.hpp>
#include <uhd/transport/bounded_buffer.hpp>
-#include <boost/thread/mutex.hpp>
+#include <mutex>
using namespace uhd;
using namespace uhd::usrp;
@@ -99,7 +99,7 @@ public:
* Peek and poke 32 bit implementation
******************************************************************/
void poke32(const wb_addr_type addr, const uint32_t data){
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
this->send_pkt(addr, data, POKE32_CMD);
@@ -107,7 +107,7 @@ public:
}
uint32_t peek32(const wb_addr_type addr){
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
this->send_pkt(addr, 0, PEEK32_CMD);
@@ -129,7 +129,7 @@ public:
* FIFO controlled SPI implementation
******************************************************************/
void init_spi(void){
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
this->send_pkt(SPI_DIV, SPI_DIVIDER, POKE32_CMD);
this->wait_for_ack(_seq_out-MAX_SEQS_OUT);
@@ -144,7 +144,7 @@ public:
size_t num_bits,
bool readback
){
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
//load control word
uint32_t ctrl_word = 0;
@@ -180,7 +180,7 @@ public:
* Update methods for time
******************************************************************/
void set_time(const uhd::time_spec_t &time){
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
_time = time;
_use_time = _time != uhd::time_spec_t(0.0);
if (_use_time) _timeout = MASSIVE_TIMEOUT; //permanently sets larger timeout
@@ -188,12 +188,12 @@ public:
uhd::time_spec_t get_time(void)
{
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
return _time;
}
void set_tick_rate(const double rate){
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
_tick_rate = rate;
}
@@ -258,7 +258,7 @@ private:
zero_copy_if::sptr _xport;
const fifo_ctrl_excelsior_config _config;
- boost::mutex _mutex;
+ std::mutex _mutex;
uint16_t _seq_out;
uint16_t _seq_ack;
uhd::time_spec_t _time;