aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorSugandha Gupta <sugandha.gupta@ettus.com>2019-01-14 14:15:57 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-01-18 17:51:35 -0800
commitd711f6d794561bba292b9907d1aa19a0fdd85b51 (patch)
treee741795e9066b1f7e45ae1bc7dcfe8386ee0b10a /host/lib
parenta53130679944ddd179593259eb953b89ab1a7a38 (diff)
downloaduhd-d711f6d794561bba292b9907d1aa19a0fdd85b51.tar.gz
uhd-d711f6d794561bba292b9907d1aa19a0fdd85b51.tar.bz2
uhd-d711f6d794561bba292b9907d1aa19a0fdd85b51.zip
lib: transport: Revert to boost instead of std sleep
std::sleep_for causes issues with priority threading when running examples in embedded mode on some devices (E310). boost::sleep_for does not have this problem.
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/transport/muxed_zero_copy_if.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/host/lib/transport/muxed_zero_copy_if.cpp b/host/lib/transport/muxed_zero_copy_if.cpp
index b26d2097c..feaa43b70 100644
--- a/host/lib/transport/muxed_zero_copy_if.cpp
+++ b/host/lib/transport/muxed_zero_copy_if.cpp
@@ -13,9 +13,7 @@
#include <boost/make_shared.hpp>
#include <boost/thread.hpp>
#include <boost/thread/locks.hpp>
-#include <chrono>
#include <map>
-#include <thread>
using namespace uhd;
using namespace uhd::transport;
@@ -224,7 +222,7 @@ private:
if (not _process_next_buffer()) {
// Be a good citizen and yield if no packet is processed
static const size_t MIN_DUR = 1;
- std::this_thread::sleep_for(std::chrono::nanoseconds(MIN_DUR));
+ boost::this_thread::sleep_for(boost::chrono::nanoseconds(MIN_DUR));
// We call sleep(MIN_DUR) above instead of yield() to ensure that we
// relinquish the current scheduler time slot.
// yield() is a hint to the scheduler to end the time