diff --git a/Cargo.toml b/Cargo.toml index d59be33..b80e1e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ unwrap_used = "deny" expect_used = "deny" [features] -default = ["rq-mutex"] +default = ["rq-mpmc"] smarm-trace = [] # RFC 007: native causal profiling. Zero cost when off (cf. smarm-trace): the # hook in `maybe_preempt` and the resume-path fast-forward compile away; the diff --git a/src/run_queue.rs b/src/run_queue.rs index 16656e5..6814e8b 100644 --- a/src/run_queue.rs +++ b/src/run_queue.rs @@ -2,9 +2,9 @@ //! features (no runtime dispatch — the scheduler's pop loop is the hottest //! code in the runtime): //! -//! - `rq-mutex` (default) — `Mutex`. The control/baseline: +//! - `rq-mutex` — `Mutex`. The control/baseline: //! strictly FIFO, trivially correct, one global lock. -//! - `rq-mpmc` — a single hand-rolled Vyukov bounded MPMC ring (per-cell +//! - `rq-mpmc` (default) — a single hand-rolled Vyukov bounded MPMC ring (per-cell //! sequence numbers). Strict FIFO, lock-free, one hot //! enqueue/dequeue cache-line pair. //! - `rq-striped` — M Vyukov rings with fetch-add ticket distribution. @@ -61,20 +61,20 @@ use std::mem::MaybeUninit; #[cfg(not(any(feature = "rq-mutex", feature = "rq-mpmc", feature = "rq-striped")))] compile_error!( "smarm: no run queue selected. Enable exactly one of the features \ - `rq-mutex` (default), `rq-mpmc`, `rq-striped`." + `rq-mpmc` (default), `rq-mutex`, `rq-striped`." ); #[cfg(all(feature = "rq-mutex", feature = "rq-mpmc"))] compile_error!( "smarm: features `rq-mutex` and `rq-mpmc` are mutually exclusive \ - (use --no-default-features to drop the default `rq-mutex`)." + (use --no-default-features to drop the default `rq-mpmc`)." ); #[cfg(all(feature = "rq-mutex", feature = "rq-striped"))] -compile_error!( - "smarm: features `rq-mutex` and `rq-striped` are mutually exclusive \ - (use --no-default-features to drop the default `rq-mutex`)." -); +compile_error!("smarm: features `rq-mutex` and `rq-striped` are mutually exclusive."); #[cfg(all(feature = "rq-mpmc", feature = "rq-striped"))] -compile_error!("smarm: features `rq-mpmc` and `rq-striped` are mutually exclusive."); +compile_error!( + "smarm: features `rq-mpmc` and `rq-striped` are mutually exclusive \ + (use --no-default-features to drop the default `rq-mpmc`)." +); #[cfg(feature = "rq-mutex")] pub(crate) type RunQueue = MutexQueue;