UHD
003.006.000-0-g7788c692
|
Simple managed buffer with release interface. More...
#include <zero_copy.hpp>
Public Types | |
typedef boost::intrusive_ptr< managed_buffer > | sptr |
Public Member Functions | |
managed_buffer (void) | |
virtual void | release (void)=0 |
UHD_INLINE void | commit (size_t num_bytes) |
template<class T > | |
UHD_INLINE T | cast (void) const |
UHD_INLINE size_t | size (void) const |
template<typename T > | |
UHD_INLINE boost::intrusive_ptr< T > | make (T *p, void *buffer, size_t length) |
Create smart pointer to a reusable managed buffer. More... | |
Public Attributes | |
boost::detail::atomic_count | _ref_count |
Protected Attributes | |
void * | _buffer |
size_t | _length |
Simple managed buffer with release interface.
typedef boost::intrusive_ptr<managed_buffer> uhd::transport::managed_buffer::sptr |
|
inline |
|
inline |
Get a pointer to the underlying buffer.
|
inline |
Use commit() to re-write the length (for use with send buffers).
num_bytes | the number of bytes written into the buffer |
|
inline |
Create smart pointer to a reusable managed buffer.
|
pure virtual |
Signal to the transport that we are done with the buffer. This should be called to release the buffer to the transport object. After calling, the referenced memory should be considered invalid.
|
inline |
Get the size of the underlying buffer.
|
protected |
|
protected |
boost::detail::atomic_count uhd::transport::managed_buffer::_ref_count |