From 92fd3a514b6808e7b94f172c75afb2026b849fce Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 2 Jun 2010 14:49:32 -0700 Subject: disable boost thread interrupt when doing pop with timed wait, fixed error on exit --- host/lib/usrp/usrp2/io_impl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/usrp2/io_impl.cpp') diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index efd64d4ab..43d6e814a 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -72,9 +72,9 @@ usrp2_impl::io_impl::~io_impl(void){ managed_recv_buffer::sptr usrp2_impl::io_impl::get_recv_buff(void){ managed_recv_buffer::sptr buff; + boost::this_thread::disable_interruption di; //disable because the wait can throw recv_pirate_booty->pop_with_timed_wait(buff, boost::posix_time::milliseconds(100)); - //timeout means a null sptr... - return buff; + return buff; //a timeout means that we return a null sptr... } void usrp2_impl::io_impl::recv_pirate_loop(zero_copy_if::sptr zc_if){ @@ -119,6 +119,8 @@ void usrp2_impl::io_init(void){ _iface->poke32(FR_RX_CTRL_VRT_STREAM_ID, 0); _iface->poke32(FR_RX_CTRL_VRT_TRAILER, 0); + std::cout << "TX samples per packet: " << get_max_send_samps_per_packet() << std::endl; + //create new io impl _io_impl = new io_impl(_data_transport); } -- cgit v1.2.3