aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-04-26 09:30:48 -0700
committerMartin Braun <martin.braun@ettus.com>2018-04-30 17:10:26 -0700
commit0303f1ed558b21e40f80c388b096432b4bf6e883 (patch)
tree05afcc4d2401bb86f9e38e3b04ec5b07e9268302 /host/lib/usrp/e300
parentfc67052345373c6d5c1b62064a9f9ef6f888e3ff (diff)
downloaduhd-0303f1ed558b21e40f80c388b096432b4bf6e883.tar.gz
uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.tar.bz2
uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.zip
lib: Purge all references to boost::this_thread::sleep()
Replace with std::this_thread::sleep_for().
Diffstat (limited to 'host/lib/usrp/e300')
-rw-r--r--host/lib/usrp/e300/e300_fifo_config.cpp4
-rw-r--r--host/lib/usrp/e300/e300_i2c.cpp9
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp9
-rw-r--r--host/lib/usrp/e300/e300_network.cpp5
4 files changed, 16 insertions, 11 deletions
diff --git a/host/lib/usrp/e300/e300_fifo_config.cpp b/host/lib/usrp/e300/e300_fifo_config.cpp
index 044ce01ee..2c0027ae0 100644
--- a/host/lib/usrp/e300/e300_fifo_config.cpp
+++ b/host/lib/usrp/e300/e300_fifo_config.cpp
@@ -11,6 +11,8 @@
#include <uhd/config.hpp>
#include <stdint.h>
#include <atomic>
+#include <chrono>
+#include <thread>
// constants coded into the fpga parameters
static const size_t ZF_CONFIG_BASE = 0x40000000;
@@ -256,7 +258,7 @@ public:
break;
}
_waiter->wait(timeout);
- //boost::this_thread::sleep(boost::posix_time::milliseconds(1));
+ //std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return typename T::sptr();
diff --git a/host/lib/usrp/e300/e300_i2c.cpp b/host/lib/usrp/e300/e300_i2c.cpp
index c3db4f67a..24fd429b5 100644
--- a/host/lib/usrp/e300/e300_i2c.cpp
+++ b/host/lib/usrp/e300/e300_i2c.cpp
@@ -5,13 +5,14 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
+#include "e300_i2c.hpp"
#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
#include <uhd/transport/udp_simple.hpp>
-
-#include "e300_i2c.hpp"
#include <cstring>
+#include <chrono>
+#include <thread>
namespace uhd { namespace usrp { namespace e300 {
@@ -281,7 +282,7 @@ public:
throw std::runtime_error("ioctl failed");
}
// this is ugly
- boost::this_thread::sleep(boost::posix_time::milliseconds(5));
+ std::this_thread::sleep_for(std::chrono::milliseconds(5));
}
uint8_t get_i2c_reg8(
@@ -339,7 +340,7 @@ public:
throw std::runtime_error("ioctl failed");
}
// this is ugly
- boost::this_thread::sleep(boost::posix_time::milliseconds(5));
+ std::this_thread::sleep_for(std::chrono::milliseconds(5));
}
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 324b25407..9aa872ff3 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -32,9 +32,10 @@
#include <boost/bind.hpp>
#include <boost/make_shared.hpp>
#include <boost/assign/list_of.hpp>
-#include <boost/thread/thread.hpp> //sleep
#include <boost/asio.hpp>
#include <fstream>
+#include <chrono>
+#include <thread>
using namespace uhd;
using namespace uhd::usrp;
@@ -395,7 +396,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
ad9361_params::sptr client_settings = boost::make_shared<e300_ad9361_client_t>();
_codec_ctrl = ad9361_ctrl::make_spi(client_settings, spi::make(E300_SPIDEV_DEVICE), 1);
// This is horrible ... why do I have to sleep here?
- boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
_eeprom_manager = boost::make_shared<e300_eeprom_manager>(i2c::make_i2cdev(E300_I2CDEV_DEVICE));
_sensor_manager = e300_sensor_manager::make_local(_global_regs);
}
@@ -415,7 +416,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
if (_gps) {
for (size_t i = 0; i < _GPS_TIMEOUT; i++)
{
- boost::this_thread::sleep(boost::posix_time::seconds(1));
+ std::this_thread::sleep_for(std::chrono::seconds(1));
if (!_gps->gps_detected())
std::cout << "." << std::flush;
else {
@@ -1141,7 +1142,7 @@ void e300_impl::_reset_codec_mmcm(void)
{
_misc.codec_arst = 1;
_update_gpio_state();
- boost::this_thread::sleep(boost::posix_time::milliseconds(10));
+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
_misc.codec_arst = 0;
_update_gpio_state();
}
diff --git a/host/lib/usrp/e300/e300_network.cpp b/host/lib/usrp/e300/e300_network.cpp
index d7473d2ee..d9a104dda 100644
--- a/host/lib/usrp/e300/e300_network.cpp
+++ b/host/lib/usrp/e300/e300_network.cpp
@@ -26,11 +26,12 @@
#include <uhdlib/usrp/common/ad9361_ctrl.hpp>
#include <boost/asio.hpp>
-#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include <boost/make_shared.hpp>
#include <fstream>
+#include <chrono>
+#include <thread>
using namespace uhd;
using namespace uhd::transport;
@@ -630,7 +631,7 @@ network_server_impl::network_server_impl(const uhd::device_addr_t &device_addr)
ad9361_params::sptr client_settings = boost::make_shared<e300_ad9361_client_t>();
_codec_ctrl = ad9361_ctrl::make_spi(client_settings, spi::make(E300_SPIDEV_DEVICE), 1);
// This is horrible ... why do I have to sleep here?
- boost::this_thread::sleep(boost::posix_time::milliseconds(100));
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
_sensor_manager = e300_sensor_manager::make_local(_global_regs);
}