6 #ifndef IOURINGFALLBACK_HPP_INCLUDE
7 #define IOURINGFALLBACK_HPP_INCLUDE
27 void prep_read(std::shared_ptr<int> ret,
int fd,
28 void *buf,
unsigned nbytes, off_t offset)
override;
30 void prep_write(std::shared_ptr<int> ret,
int fd,
31 const void *buf,
unsigned nbytes, off_t offset)
override;
36 static std::unique_ptr<IOUring>
make_unique(
unsigned entries);
40 using FutureOperation = std::pair<std::shared_ptr<int>, std::function<int()> >;
41 std::vector<FutureOperation> m_operations;
Fallback implementation of the IOUring batch interface. This implementation uses queues of individual...
Definition: IOUringFallback.hpp:20
IOUringFallback(unsigned entries)
Definition: IOUringFallback.cpp:15
virtual ~IOUringFallback()
Definition: IOUringFallback.cpp:21
static std::unique_ptr< IOUring > make_unique(unsigned entries)
Create a fallback implementation of IOUring that uses non-batched IO operations, in case we cannot us...
Definition: IOUringFallback.cpp:58
void prep_read(std::shared_ptr< int > ret, int fd, void *buf, unsigned nbytes, off_t offset) override
Perform a pread in the next batch submission.
Definition: IOUringFallback.cpp:46
void prep_write(std::shared_ptr< int > ret, int fd, const void *buf, unsigned nbytes, off_t offset) override
Perform a pwrite in the next batch submission.
Definition: IOUringFallback.cpp:52
void submit() override
Submit all prepared uring operations in a batch, and wait for all operations to return a result....
Definition: IOUringFallback.cpp:25
Definition: IOUring.hpp:18