diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/export.rs | 4 | ||||
-rw-r--r-- | src/lib.rs | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/export.rs b/src/export.rs index 07a41d73..df4d86fc 100644 --- a/src/export.rs +++ b/src/export.rs @@ -171,7 +171,7 @@ pub unsafe fn lock<T, R>( #[cfg(armv7m)] #[inline(always)] pub unsafe fn lock_struct<T, R>( - ptr: impl Fn() -> T, + ptr: unsafe fn() -> T, priority: &Priority, ceiling: u8, nvic_prio_bits: u8, @@ -237,7 +237,7 @@ pub unsafe fn lock<T, R>( #[cfg(not(armv7m))] #[inline(always)] pub unsafe fn lock_struct<T, R>( - ptr: impl Fn() -> T, + ptr: unsafe fn() -> T, priority: &Priority, ceiling: u8, _nvic_prio_bits: u8, @@ -105,11 +105,11 @@ impl<T> RacyCell<T> { unsafe impl<T> Sync for RacyCell<T> {} -/// Should be moved to `rtic-core` -pub trait MutexStruct { - /// Data protected by the mutex - type T; +// /// Should be moved to `rtic-core` +// pub trait MutexStruct { +// /// Data protected by the mutex +// type T; - /// Creates a critical section and grants temporary access to the protected data - fn lock<R>(&mut self, f: impl FnOnce(&mut Self::T) -> R) -> R; -} +// /// Creates a critical section and grants temporary access to the protected data +// fn lock<R>(&mut self, f: impl FnOnce(&mut Self::T) -> R) -> R; +// } |