aboutsummaryrefslogtreecommitdiff
path: root/rtic-channel/src/wait_queue.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-channel/src/wait_queue.rs')
-rw-r--r--rtic-channel/src/wait_queue.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/rtic-channel/src/wait_queue.rs b/rtic-channel/src/wait_queue.rs
index 90d762b..5b59983 100644
--- a/rtic-channel/src/wait_queue.rs
+++ b/rtic-channel/src/wait_queue.rs
@@ -1,6 +1,5 @@
//! ...
-use core::cell::UnsafeCell;
use core::marker::PhantomPinned;
use core::ptr::null_mut;
use core::sync::atomic::{AtomicPtr, Ordering};
@@ -9,27 +8,6 @@ use critical_section as cs;
pub type WaitQueue = LinkedList<Waker>;
-struct MyLinkPtr<T>(UnsafeCell<*mut Link<T>>);
-
-impl<T> MyLinkPtr<T> {
- #[inline(always)]
- fn new(val: *mut Link<T>) -> Self {
- Self(UnsafeCell::new(val))
- }
-
- /// SAFETY: Only use this in a critical section, and don't forget them barriers.
- #[inline(always)]
- unsafe fn load_relaxed(&self) -> *mut Link<T> {
- unsafe { *self.0.get() }
- }
-
- /// SAFETY: Only use this in a critical section, and don't forget them barriers.
- #[inline(always)]
- unsafe fn store_relaxed(&self, val: *mut Link<T>) {
- unsafe { self.0.get().write(val) }
- }
-}
-
/// A FIFO linked list for a wait queue.
pub struct LinkedList<T> {
head: AtomicPtr<Link<T>>, // UnsafeCell<*mut Link<T>>