From ea5ce50a465e714c63196f52df97fb3e927e701c Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 14 May 2011 17:11:05 -0700 Subject: uhd: replace managed buffer shared pointer w/ intrusive pointer to reduce overhead --- host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'host/lib/usrp/usrp_e100') diff --git a/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp b/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp index 26774aeda..bb421507a 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp @@ -51,14 +51,10 @@ public: sptr get_new(void){ if (fp_verbose) UHD_LOGV(always) << " make_recv_buff: " << get_size() << std::endl; _info->flags = RB_USER_PROCESS; //claim the frame - return sptr(this, &usrp_e100_mmap_zero_copy_mrb::fake_deleter); + return make_managed_buffer(this); } private: - static void fake_deleter(void *obj){ - static_cast(obj)->release(); - } - const void *get_buff(void) const{return _mem;} size_t get_size(void) const{return _info->len;} @@ -90,14 +86,10 @@ public: sptr get_new(void){ if (fp_verbose) UHD_LOGV(always) << " make_send_buff: " << get_size() << std::endl; _info->flags = RB_USER_PROCESS; //claim the frame - return sptr(this, &usrp_e100_mmap_zero_copy_msb::fake_deleter); + return make_managed_buffer(this); } private: - static void fake_deleter(void *obj){ - static_cast(obj)->commit(0); - } - void *get_buff(void) const{return _mem;} size_t get_size(void) const{return _len;} -- cgit v1.2.3