From 30cfade8252f2a82468227c1fb09aac635962fdd Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 21 Sep 2011 15:58:51 -0700 Subject: usrp: super packet handler release in order Makes new usb implementation work where submissions must be in order. --- host/lib/transport/super_recv_packet_handler.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index 15bd78242..541c588e6 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -578,6 +578,13 @@ private: metadata.fragment_offset = info.fragment_offset_in_samps; info.fragment_offset_in_samps += nsamps_to_copy; //set for next call + //done with buffers? this action releases buffers in-order + if (not metadata.more_fragments){ + BOOST_FOREACH(per_buffer_info_type &buff_info, info){ + buff_info.buff.reset(); //effectively a release + } + } + return nsamps_to_copy_per_io_buff; } }; -- cgit v1.2.3