From bd7c0f67cf8aa166cf4e1314bd96858f78eeb8f9 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 30 Jul 2018 13:46:14 -0700 Subject: b100: Fix fifo_ctrl_excelsior not exiting --- host/lib/usrp/b100/fifo_ctrl_excelsior.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'host') diff --git a/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp b/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp index e110919f9..ed278e6be 100644 --- a/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp +++ b/host/lib/usrp/b100/fifo_ctrl_excelsior.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later // -#include +#include "fifo_ctrl_excelsior.hpp" #include #include #include @@ -16,9 +16,6 @@ #include #include #include -#include -#include -#include using namespace uhd; using namespace uhd::usrp; @@ -54,7 +51,7 @@ public: while (_xport->get_recv_buff(0.0)){} //flush this->set_time(uhd::time_spec_t(0.0)); this->set_tick_rate(1.0); //something possible but bogus - _msg_task = task::make(boost::bind(&fifo_ctrl_excelsior_impl::handle_msg, this)); + _msg_task = task::make([this](){ this->handle_msg(); }); this->init_spi(); } @@ -66,18 +63,10 @@ public: } bool pop_async_msg(async_metadata_t &async_metadata, double timeout){ - boost::this_thread::disable_interruption di; //disable because the wait can throw return _async_fifo.pop_with_timed_wait(async_metadata, timeout); } void handle_msg(void){ - set_thread_priority_safe(); - while (not boost::this_thread::interruption_requested()){ - this->handle_msg1(); - } - } - - void handle_msg1(void){ managed_recv_buffer::sptr buff = _xport->get_recv_buff(); if (not buff) return; const uint32_t *pkt = buff->cast(); -- cgit v1.2.3