6 #ifndef IOURING_HPP_INCLUDE
7 #define IOURING_HPP_INCLUDE
44 virtual void prep_read(std::shared_ptr<int> ret,
int fd,
45 void *buf,
unsigned nbytes, off_t offset) = 0;
57 virtual void prep_write(std::shared_ptr<int> ret,
int fd,
58 const void *buf,
unsigned nbytes, off_t offset) = 0;
65 static std::unique_ptr<IOUring>
make_unique(
unsigned entries);
Definition: IOUring.hpp:18
virtual void submit()=0
Submit all prepared uring operations in a batch, and wait for all operations to return a result....
virtual void prep_write(std::shared_ptr< int > ret, int fd, const void *buf, unsigned nbytes, off_t offset)=0
Perform a pwrite in the next batch submission.
virtual void prep_read(std::shared_ptr< int > ret, int fd, void *buf, unsigned nbytes, off_t offset)=0
Perform a pread in the next batch submission.
virtual ~IOUring()=default
Clean up the IO uring.
static std::unique_ptr< IOUring > make_unique(unsigned entries)
Create an object that supports an io_uring-like interface. The created object uses io_uring if suppor...
Definition: IOUring.cpp:35
IOUring()=default
Create and initialize an IO uring.