From d711f6d794561bba292b9907d1aa19a0fdd85b51 Mon Sep 17 00:00:00 2001 From: Sugandha Gupta Date: Mon, 14 Jan 2019 14:15:57 -0800 Subject: 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. --- host/lib/transport/muxed_zero_copy_if.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'host/lib/transport') 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 #include #include -#include #include -#include 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 -- cgit v1.2.3