From 99febbe3a42ac05b723e6e76088d159eb0acfa5e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Sep 2025 13:55:55 +0200 Subject: more docs fixes --- embassy-sync/src/blocking_mutex/mod.rs | 4 ++-- embassy-sync/src/blocking_mutex/raw.rs | 4 ++-- embassy-sync/src/rwlock.rs | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'embassy-sync/src') diff --git a/embassy-sync/src/blocking_mutex/mod.rs b/embassy-sync/src/blocking_mutex/mod.rs index 11809c763..62bfc26fb 100644 --- a/embassy-sync/src/blocking_mutex/mod.rs +++ b/embassy-sync/src/blocking_mutex/mod.rs @@ -135,9 +135,9 @@ impl Mutex { // There's still a ThreadModeRawMutex for use with the generic Mutex (handy with Channel, for example), // but that will require T: Send even though it shouldn't be needed. -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] pub use thread_mode_mutex::*; -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] mod thread_mode_mutex { use super::*; diff --git a/embassy-sync/src/blocking_mutex/raw.rs b/embassy-sync/src/blocking_mutex/raw.rs index 50f965e00..fbb9ece15 100644 --- a/embassy-sync/src/blocking_mutex/raw.rs +++ b/embassy-sync/src/blocking_mutex/raw.rs @@ -89,7 +89,7 @@ unsafe impl RawMutex for NoopRawMutex { // ================ -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] mod thread_mode { use super::*; @@ -147,5 +147,5 @@ mod thread_mode { return unsafe { (0xE000ED04 as *const u32).read_volatile() } & 0x1FF == 0; } } -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] pub use thread_mode::*; diff --git a/embassy-sync/src/rwlock.rs b/embassy-sync/src/rwlock.rs index 0d784a7dc..e43388c4d 100644 --- a/embassy-sync/src/rwlock.rs +++ b/embassy-sync/src/rwlock.rs @@ -37,8 +37,6 @@ struct State { /// Use [`NoopRawMutex`](crate::blocking_mutex::raw::NoopRawMutex) when data is only shared between tasks running on the same executor. /// /// Use [`ThreadModeRawMutex`](crate::blocking_mutex::raw::ThreadModeRawMutex) when data is shared between tasks running on the same executor but you want a singleton. -/// - pub struct RwLock where M: RawMutex, -- cgit