Buffer table for io_uring.
More...
#include <ring.hpp>
|
| int | init (size_t capacity) |
| | Initialize the buffer table with the given capacity.
|
| int | destroy () |
| | Destroy the buffer table.
|
| int | update (unsigned index_base, const iovec *vecs, unsigned nr_vecs) |
| | Update the buffer table starting from the given index.
|
| int | clone_buffers (BufferTable &src, unsigned int dst_off=0, unsigned int src_off=0, unsigned int nr=0) |
| | Clone buffers from another BufferTable into this one.
|
Buffer table for io_uring.
This class makes an abstraction over the io_uring buffer registration interface.
◆ clone_buffers()
| int condy::BufferTable::clone_buffers |
( |
BufferTable & | src, |
|
|
unsigned int | dst_off = 0, |
|
|
unsigned int | src_off = 0, |
|
|
unsigned int | nr = 0 ) |
|
inline |
Clone buffers from another BufferTable into this one.
- Parameters
-
| src | The source BufferTable to clone from |
| dst_off | The starting offset in the destination buffer table |
| src_off | The starting offset in the source buffer table |
| nr | The number of buffers to clone |
- Returns
- int Returns 0 on success or a negative error code on failure
◆ destroy()
| int condy::BufferTable::destroy |
( |
| ) |
|
|
inline |
Destroy the buffer table.
- Returns
- int Returns 0 on success or a negative error code on failure
◆ init()
| int condy::BufferTable::init |
( |
size_t | capacity | ) |
|
|
inline |
Initialize the buffer table with the given capacity.
- Parameters
-
| capacity | The number of buffers to allocate in the table |
- Returns
- int Returns 0 on success or a negative error code on failure
◆ update()
| int condy::BufferTable::update |
( |
unsigned | index_base, |
|
|
const iovec * | vecs, |
|
|
unsigned | nr_vecs ) |
|
inline |
Update the buffer table starting from the given index.
- Parameters
-
| index_base | The starting index to update |
| vecs | Pointer to the array of iovec structures representing buffers |
| nr_vecs | Number of buffers to update |
- Returns
- int Returns 0 on success or a negative error code on failure
The documentation for this class was generated from the following file: