eve.backend.linux.uring
Linux runtime-selected Layer 0 backend.
On kernels that allow io_uring, this module exposes a real io_uring-backed readiness poller. When setup is rejected or unavailable it falls back to the reliable epoll backend so higher layers still have a usable Linux path.
enum OperationKind
struct OsPoller
Types 2
POLL = 1
REMOVE = 2
structOsPoller
Linux Layer 0 poller that prefers io_uring and falls back to epoll when the runtime rejects io_uring setup.
Fields
private eve.backend.linux.epoll.OsPoller _fallbackprivate bool _usingFallbackprivate bool _ioUringAvailableprivate bool _sqpollActiveprivate uint _sqThreadIdleprivate int _probeErrorprivate int _fdprivate void * _sqRingprivate void * _cqRingprivate void * _sqesRegionprivate size_t _sqRingLengthprivate size_t _cqRingLengthprivate size_t _sqesLengthprivate bool _singleMmapprivate shared(uint) * _sqHeadprivate shared(uint) * _sqTailprivate shared(uint) * _sqRingMaskprivate shared(uint) * _sqRingEntriesprivate shared(uint) * _sqArrayprivate io_uring_sqe * _sqesprivate shared(uint) * _cqHeadprivate shared(uint) * _cqTailprivate shared(uint) * _cqRingMaskprivate shared(uint) * _cqRingEntriesprivate io_uring_cqe * _cqesprivate Registration * _registrationsprivate size_t _registrationCapacityprivate NativeEvent * _pendingEventsprivate size_t _pendingHeadprivate size_t _pendingCountprivate ulong _submitSequenceprivate uint * _fdToSlotprivate size_t _fdToSlotMaskprivate KernelTimespec _timeoutSpecprivate uint _emptySlotMethods
private
ulong makeOperationId(uint slotIndex, OperationKind kind, ulong sequence) static pure @safe nothrow @nogcprivate
int submitPollAddWithTimeout(uint slotIndex, int timeoutMs, ulong timeoutUserData) @trusted nothrow @nogcSubmit a poll_add SQE chained with a linked timeout.private
bool processCompletion(ref const(io_uring_cqe) cqe, scope NativeEvent[] output, ref int written, ulong awaitedUserData, ref int awaitedResult) @trusted nothrow @nogcprivate
bool drainCompletions(scope NativeEvent[] output, ref int written, ulong awaitedUserData, ref int awaitedResult) @trusted nothrow @nogcOsPoller create(bool sqpoll, uint sqThreadIdle = 20) static @trusted nothrow @nogcCreate a new Linux poller with optional SQPOLL mode.bool isValid() @property const pure @safe nothrow @nogcCheck whether the active backend was created successfully.bool ioUringAvailable() @property const pure @safe nothrow @nogcReport whether `io_uring` is active for this poller instance.uint sqThreadIdle() @property const pure @safe nothrow @nogcReport the configured SQPOLL thread idle timeout.bool usingFallback() @property const pure @safe nothrow @nogcReport whether this poller instance is using the `epoll` fallback path.BackendId backendId() @property const pure @safe nothrow @nogcReturn the identifier of the active backend.BackendCapabilities capabilities() @property const pure @safe nothrow @nogcReturn the capability flags for the active backend.Handle handle() @property const pure @safe nothrow @nogcReturn the native handle wrapper for the active backend.int registerHandle(Handle handle, IoInterest interest, ulong userData, WatcherFlags flags = WatcherFlags.none) @trusted nothrow @nogc Register a handle with the active backend. Params: handle = Handle to register. interest = Requested readiness mask. userData = Opaque value returned in translated events. ...int modifyHandle(Handle handle, IoInterest interest, ulong userData, WatcherFlags flags = WatcherFlags.none) @trusted nothrow @nogc Modify the interest mask and user data for a registered handle. Params: handle = Registered handle to update. interest = New readiness mask. userData = Replacement opaque value....int wait(scope NativeEvent[] nativeEvents, int timeoutMs) @trusted nothrow @nogc Wait for native events from the active backend. Params: nativeEvents = Caller-provided output buffer for native events. timeoutMs = Wait timeout in milliseconds. `-1` means infinite...OsEvent translate(ref const(NativeEvent) nativeEvent) static pure @safe nothrow @nogcTranslate a native backend event into the shared Layer 0 event shape.IoReady translateReady(uint nativeMask) static pure @safe nothrow @nogcTranslate a native readiness mask into shared readiness flags.Nested Templates
RegistrationFunctions 3
Variables 1
private enumvar
requestedRingEntries = 1024u