18 #ifndef INCLUDED_UHD_TRANSPORT_ZERO_COPY_HPP
19 #define INCLUDED_UHD_TRANSPORT_ZERO_COPY_HPP
22 #include <boost/utility.hpp>
23 #include <boost/shared_ptr.hpp>
24 #include <boost/intrusive_ptr.hpp>
25 #include <boost/detail/atomic_count.hpp>
27 namespace uhd{
namespace transport{
41 virtual void release(
void) = 0;
56 return static_cast<T
>(_buffer);
68 template <
typename T>
UHD_INLINE boost::intrusive_ptr<T> make(
69 T *p,
void *buffer,
size_t length
73 return boost::intrusive_ptr<T>(p);
77 typedef boost::intrusive_ptr<managed_buffer>
sptr;
99 typedef boost::intrusive_ptr<managed_recv_buffer>
sptr;
109 typedef boost::intrusive_ptr<managed_send_buffer>
sptr;
119 typedef boost::shared_ptr<zero_copy_if>
sptr;
133 virtual size_t get_num_recv_frames(
void)
const = 0;
140 virtual size_t get_recv_frame_size(
void)
const = 0;
154 virtual size_t get_num_send_frames(
void)
const = 0;
161 virtual size_t get_send_frame_size(
void)
const = 0;