mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Fix spelling error
This commit is contained in:
parent
bad222b5a3
commit
4c95224e72
3 changed files with 8 additions and 8 deletions
|
@ -82,7 +82,7 @@ impl<T> Arbiter<T> {
|
||||||
// which happens outside this `poll_fn`'s stack frame.
|
// which happens outside this `poll_fn`'s stack frame.
|
||||||
let link = unsafe { link_ptr.get() };
|
let link = unsafe { link_ptr.get() };
|
||||||
if let Some(link) = link {
|
if let Some(link) = link {
|
||||||
if link.is_poped() {
|
if link.is_popped() {
|
||||||
return Poll::Ready(());
|
return Poll::Ready(());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -267,7 +267,7 @@ impl<'a, T, const N: usize> Sender<'a, T, N> {
|
||||||
// which happens outside this `poll_fn`'s stack frame.
|
// which happens outside this `poll_fn`'s stack frame.
|
||||||
let link = unsafe { link_ptr.get() };
|
let link = unsafe { link_ptr.get() };
|
||||||
if let Some(link) = link {
|
if let Some(link) = link {
|
||||||
if !link.is_poped() {
|
if !link.is_popped() {
|
||||||
return None;
|
return None;
|
||||||
} else {
|
} else {
|
||||||
// Fall through to dequeue
|
// Fall through to dequeue
|
||||||
|
|
|
@ -58,7 +58,7 @@ impl<T: Clone> LinkedList<T> {
|
||||||
// Clear the pointers in the node.
|
// Clear the pointers in the node.
|
||||||
head_ref.next.store(null_mut(), Self::R);
|
head_ref.next.store(null_mut(), Self::R);
|
||||||
head_ref.prev.store(null_mut(), Self::R);
|
head_ref.prev.store(null_mut(), Self::R);
|
||||||
head_ref.is_poped.store(true, Self::R);
|
head_ref.is_popped.store(true, Self::R);
|
||||||
|
|
||||||
return Some(head_val);
|
return Some(head_val);
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ pub struct Link<T> {
|
||||||
pub(crate) val: T,
|
pub(crate) val: T,
|
||||||
next: AtomicPtr<Link<T>>,
|
next: AtomicPtr<Link<T>>,
|
||||||
prev: AtomicPtr<Link<T>>,
|
prev: AtomicPtr<Link<T>>,
|
||||||
is_poped: AtomicBool,
|
is_popped: AtomicBool,
|
||||||
_up: PhantomPinned,
|
_up: PhantomPinned,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,14 +115,14 @@ impl<T: Clone> Link<T> {
|
||||||
val,
|
val,
|
||||||
next: AtomicPtr::new(null_mut()),
|
next: AtomicPtr::new(null_mut()),
|
||||||
prev: AtomicPtr::new(null_mut()),
|
prev: AtomicPtr::new(null_mut()),
|
||||||
is_poped: AtomicBool::new(false),
|
is_popped: AtomicBool::new(false),
|
||||||
_up: PhantomPinned,
|
_up: PhantomPinned,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return true if this link has been poped from the list.
|
/// Return true if this link has been poped from the list.
|
||||||
pub fn is_poped(&self) -> bool {
|
pub fn is_popped(&self) -> bool {
|
||||||
self.is_poped.load(Self::R)
|
self.is_popped.load(Self::R)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Remove this link from a linked list.
|
/// Remove this link from a linked list.
|
||||||
|
@ -133,7 +133,7 @@ impl<T: Clone> Link<T> {
|
||||||
|
|
||||||
let prev = self.prev.load(Self::R);
|
let prev = self.prev.load(Self::R);
|
||||||
let next = self.next.load(Self::R);
|
let next = self.next.load(Self::R);
|
||||||
self.is_poped.store(true, Self::R);
|
self.is_popped.store(true, Self::R);
|
||||||
|
|
||||||
match unsafe { (prev.as_ref(), next.as_ref()) } {
|
match unsafe { (prev.as_ref(), next.as_ref()) } {
|
||||||
(None, None) => {
|
(None, None) => {
|
||||||
|
|
Loading…
Reference in a new issue