aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-30 13:46:14 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-31 10:11:22 -0700
commitbd7c0f67cf8aa166cf4e1314bd96858f78eeb8f9 (patch)
treedb0ba7d965ebee4233e8b7fd2b84b08e51f75a48 /host/lib
parent57079accbb20e04602436a90bec7b71d0f6815fc (diff)
downloaduhd-bd7c0f67cf8aa166cf4e1314bd96858f78eeb8f9.tar.gz
uhd-bd7c0f67cf8aa166cf4e1314bd96858f78eeb8f9.tar.bz2
uhd-bd7c0f67cf8aa166cf4e1314bd96858f78eeb8f9.zip
b100: Fix fifo_ctrl_excelsior not exiting
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/b100/fifo_ctrl_excelsior.cpp15
1 files changed, 2 insertions, 13 deletions
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 <uhdlib/usrp/common/fifo_ctrl_excelsior.hpp>
+#include "fifo_ctrl_excelsior.hpp"
#include <uhdlib/usrp/common/async_packet_handler.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
@@ -16,9 +16,6 @@
#include <uhd/transport/vrt_if_packet.hpp>
#include <uhd/transport/bounded_buffer.hpp>
#include <boost/thread/mutex.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/format.hpp>
-#include <boost/bind.hpp>
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<const uint32_t *>();