Skip to main content

Module complete

Module complete 

Source
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_ENTER when 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_flight that takes a resolved &Ring.
push_completion
Push a completion event to the ring identified by ring_id.
push_completion_for_ring
Variant of push_completion that takes a resolved &Ring to avoid a redundant find_ring lookup in the dispatch hot path.
write_cqe_at_tail πŸ”’
Write a single CQE into the ring’s visible CQ and advance tail.