18#include <liburing/io_uring.h>
44 throw std::runtime_error(
"Error initializing io_uring: " + std::string(std::strerror(-
ret)));
49 throw std::runtime_error(
"Failed to allocate memory for the smallest possible "
50 "io_uring instance. 'memlock' memory has been exhausted for this user");
61 throw std::runtime_error(
"Error initializing io_uring: " + std::string(std::strerror(-
ret)));
63 fDepth = params.sq_entries;
100 unsigned int batch = 0;
101 unsigned int batchSize =
fDepth;
113 throw std::runtime_error(
"batch " + std::to_string(
batch) +
": "
114 +
"get SQE failed for read request '" + std::to_string(i)
118 throw std::runtime_error(
"batch " + std::to_string(
batch) +
": "
119 +
"bad fd (-1) for read request '" + std::to_string(i) +
"'");
122 throw std::runtime_error(
"batch " + std::to_string(
batch) +
": "
123 +
"null read buffer for read request '" + std::to_string(i) +
"'");
138 throw std::runtime_error(
"batch " + std::to_string(
batch) +
": "
139 "ring submit failed, error: " + std::string(
strerror(
errno)));
141 if (
submitted !=
static_cast<int>(batchSize)) {
142 throw std::runtime_error(
"ring submitted " + std::to_string(
submitted) +
143 " events but requested " + std::to_string(batchSize));
151 throw std::runtime_error(
"wait cqe failed, error: " + std::string(std::strerror(-
ret)));
155 throw std::runtime_error(
"bad cqe user data: " + std::to_string(
index));
158 throw std::runtime_error(
"batch " + std::to_string(
batch) +
": "
159 +
"read failed for ReadEvent[" + std::to_string(
index) +
"], "
160 "error: " + std::string(std::strerror(-
cqe->res)));
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
RIoUring(std::uint32_t entriesHint)
std::uint32_t GetQueueDepth()
RIoUring(const RIoUring &)=delete
RIoUring & operator=(const RIoUring &)=delete
void SubmitReadsAndWait(RReadEvent *readEvents, unsigned int nReads)
Submit a number of read events and wait for completion.
struct io_uring * GetRawRing()
Access the raw io_uring instance.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Basic read event composed of IO data and a target file descriptor.
int fFileDes
The file descriptor.
std::uint64_t fOffset
The file offset.
void * fBuffer
The destination for reading.
std::size_t fOutBytes
The number of actually read bytes, set by the RIoUring instance.
std::size_t fSize
The number of desired bytes.