Expand description
Completion routing for async I/O.
Provides a [CompletionRouter] that maps ring ids to their CQ buffers
and pushes AsyncCqe entries atomically, waking any task waiting
on the ring via SYS_ASYNC_ENTER.
FunctionsΒ§
- cq_
space_ πavailable - dec_
in_ flight - drain_
completions - Drain all pending completions for a ring and return them.
Called by
SYS_ASYNC_ENTERwhen userspace wants to consume CQEs. - flush_
backlog_ πlocked - Drain as many entries from the backlog into the visible CQ as space allows.
- in_
flight_ count - Number of in-flight operations tracked for a ring.
- inc_
in_ flight - inc_
in_ flight_ for_ ring - Variant of
inc_in_flightthat takes a resolved&Ring. - push_
completion - Push a completion event to the ring identified by
ring_id. - push_
completion_ for_ ring - Variant of
push_completionthat takes a resolved&Ringto avoid a redundantfind_ringlookup in the dispatch hot path. - write_
cqe_ πat_ tail - Write a single CQE into the ringβs visible CQ and advance tail.