aboutsummaryrefslogtreecommitdiff
path: root/rtic-common/src/wait_queue.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-common/src/wait_queue.rs')
-rw-r--r--rtic-common/src/wait_queue.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/rtic-common/src/wait_queue.rs b/rtic-common/src/wait_queue.rs
index a3f5cab..4debcb9 100644
--- a/rtic-common/src/wait_queue.rs
+++ b/rtic-common/src/wait_queue.rs
@@ -140,6 +140,10 @@ impl<T: Clone> Link<T> {
/// Remove this link from a linked list.
pub fn remove_from_list(&self, list: &DoublyLinkedList<T>) {
+ if self.is_popped() {
+ return;
+ }
+
cs::with(|_| {
// Make sure all previous writes are visible
core::sync::atomic::fence(Ordering::SeqCst);