Fix spelling error

This commit is contained in:
Emil Fresk 2023-01-31 15:55:14 +01:00 committed by Henrik Tjäder
parent 8f38470a44
commit 15d788b7fa
3 changed files with 8 additions and 8 deletions

View file

@ -82,7 +82,7 @@ impl<T> Arbiter<T> {
// which happens outside this `poll_fn`'s stack frame.
let link = unsafe { link_ptr.get() };
if let Some(link) = link {
if link.is_poped() {
if link.is_popped() {
return Poll::Ready(());
}
} else {

View file

@ -267,7 +267,7 @@ impl<'a, T, const N: usize> Sender<'a, T, N> {
// which happens outside this `poll_fn`'s stack frame.
let link = unsafe { link_ptr.get() };
if let Some(link) = link {
if !link.is_poped() {
if !link.is_popped() {
return None;
} else {
// Fall through to dequeue

View file

@ -58,7 +58,7 @@ impl<T: Clone> LinkedList<T> {
// Clear the pointers in the node.
head_ref.next.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);
}
@ -102,7 +102,7 @@ pub struct Link<T> {
pub(crate) val: T,
next: AtomicPtr<Link<T>>,
prev: AtomicPtr<Link<T>>,
is_poped: AtomicBool,
is_popped: AtomicBool,
_up: PhantomPinned,
}
@ -115,14 +115,14 @@ impl<T: Clone> Link<T> {
val,
next: AtomicPtr::new(null_mut()),
prev: AtomicPtr::new(null_mut()),
is_poped: AtomicBool::new(false),
is_popped: AtomicBool::new(false),
_up: PhantomPinned,
}
}
/// Return true if this link has been poped from the list.
pub fn is_poped(&self) -> bool {
self.is_poped.load(Self::R)
pub fn is_popped(&self) -> bool {
self.is_popped.load(Self::R)
}
/// Remove this link from a linked list.
@ -133,7 +133,7 @@ impl<T: Clone> Link<T> {
let prev = self.prev.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()) } {
(None, None) => {