aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/io_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-09-30 14:36:24 -0700
committerJosh Blum <josh@joshknows.com>2010-09-30 14:36:24 -0700
commit2c8a7c7debf19d92065661cc1d258f97bd38e224 (patch)
tree93723da79bd0dc800529e80aa6411d1c187970a5 /host/lib/usrp/usrp1/io_impl.cpp
parente4fffed05dda57bb37d693a3a26ea6a903c925f7 (diff)
downloaduhd-2c8a7c7debf19d92065661cc1d258f97bd38e224.tar.gz
uhd-2c8a7c7debf19d92065661cc1d258f97bd38e224.tar.bz2
uhd-2c8a7c7debf19d92065661cc1d258f97bd38e224.zip
uhd: implemented recv timeout for zero copy interface
Diffstat (limited to 'host/lib/usrp/usrp1/io_impl.cpp')
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index 73974f2d6..aee760a83 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -272,18 +272,18 @@ static void usrp1_bs_vrt_unpacker(
}
static bool get_recv_buffs(
- zero_copy_if::sptr zc_if,
+ zero_copy_if::sptr zc_if, size_t timeout_ms,
vrt_packet_handler::managed_recv_buffs_t &buffs
){
UHD_ASSERT_THROW(buffs.size() == 1);
- buffs[0] = zc_if->get_recv_buff();
+ buffs[0] = zc_if->get_recv_buff(timeout_ms);
return buffs[0].get() != NULL;
}
size_t usrp1_impl::recv(
const std::vector<void *> &buffs, size_t num_samps,
rx_metadata_t &metadata, const io_type_t &io_type,
- recv_mode_t recv_mode, size_t /*timeout_ms TODO*/
+ recv_mode_t recv_mode, size_t timeout_ms
){
size_t num_samps_recvd = vrt_packet_handler::recv(
_io_impl->packet_handler_recv_state, //last state of the recv handler
@@ -292,7 +292,7 @@ size_t usrp1_impl::recv(
io_type, _rx_otw_type, //input and output types to convert
_clock_ctrl->get_master_clock_freq(), //master clock tick rate
&usrp1_bs_vrt_unpacker,
- boost::bind(&get_recv_buffs, _data_transport, _1),
+ boost::bind(&get_recv_buffs, _data_transport, timeout_ms, _1),
&vrt_packet_handler::handle_overflow_nop,
0, //vrt header offset
_rx_subdev_spec.size() //num channels