Merge origin/main into macos

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Will Temple
2026-05-16 16:38:10 -04:00
66 changed files with 9558 additions and 2326 deletions

View File

@@ -1,4 +1,6 @@
//! Public runtime driver primitives.
//! RUIN Runtime Driver for Linux x86_64.
//!
//!
use std::cell::Cell;
use std::cell::RefCell;
@@ -88,12 +90,21 @@ pub struct ReadyEvents {
/// Low-level Linux runtime driver backed by `io_uring`.
pub struct Driver {
/// The `io_uring` instance driving this runtime thread.
ring: IoUring,
/// Shared notifier that other threads can use to wake this runtime thread.
notifier: Arc<NotifierInner>,
/// Next sequence number for generated completion tokens.
next_token: Cell<u64>,
/// The token of the currently active timer, if any timer is armed.
active_timer_token: Cell<Option<u64>>,
/// Accumulated count of pending wake notifications that have not yet been triggered.
pending_wakes: Cell<u64>,
/// Accumulated count of pending timer expirations that have not yet been triggered.
pending_timers: Cell<u64>,
/// Map of active completion tokens to associated handlers. When a CQE is received with a token in this map, the
/// corresponding handler will be invoked with the CQE and removed from the map. This is the core mechanism by which
/// async operations are tracked and dispatched to their continuations.
completions: RefCell<HashMap<u64, CompletionHandler>>,
}