From ba2523fca4ee9bb0336a3fd8e7e7571c344e37f3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 5 Feb 2011 12:44:23 -0800 Subject: uhd: removed instances of shared_from_this() in transports Its known to be slow and using sptrs of large objects. This should be a slight performance improvement for libusb and usrp_e100_mmap implementation. --- host/lib/transport/gen_vrt_if_packet.py | 0 host/lib/transport/libusb1_zero_copy.cpp | 7 +++---- 2 files changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 host/lib/transport/gen_vrt_if_packet.py (limited to 'host/lib/transport') diff --git a/host/lib/transport/gen_vrt_if_packet.py b/host/lib/transport/gen_vrt_if_packet.py old mode 100644 new mode 100755 diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index d4c82617c..5ae6db39e 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -279,7 +278,7 @@ libusb_transfer *usb_endpoint::get_lut_with_wait(double timeout){ /*********************************************************************** * USB zero_copy device class **********************************************************************/ -class libusb_zero_copy_impl : public usb_zero_copy, public boost::enable_shared_from_this { +class libusb_zero_copy_impl : public usb_zero_copy{ public: libusb_zero_copy_impl( @@ -400,7 +399,7 @@ managed_recv_buffer::sptr libusb_zero_copy_impl::get_recv_buff(double timeout){ else { return managed_recv_buffer::make_safe( boost::asio::const_buffer(lut->buffer, lut->actual_length), - boost::bind(&libusb_zero_copy_impl::release, shared_from_this(), lut) + boost::bind(&libusb_zero_copy_impl::release, this, lut) ); } } @@ -420,7 +419,7 @@ managed_send_buffer::sptr libusb_zero_copy_impl::get_send_buff(double timeout){ else { return managed_send_buffer::make_safe( boost::asio::mutable_buffer(lut->buffer, this->get_send_frame_size()), - boost::bind(&libusb_zero_copy_impl::commit, shared_from_this(), lut, _1) + boost::bind(&libusb_zero_copy_impl::commit, this, lut, _1) ); } } -- cgit v1.2.3