mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
fix: move the popped check after the fence
This commit is contained in:
parent
e10866ff30
commit
be6648c0ee
1 changed files with 3 additions and 2 deletions
|
|
@ -141,11 +141,12 @@ impl<T: Clone> Link<T> {
|
||||||
/// Remove this link from a linked list.
|
/// Remove this link from a linked list.
|
||||||
pub fn remove_from_list(&self, list: &DoublyLinkedList<T>) {
|
pub fn remove_from_list(&self, list: &DoublyLinkedList<T>) {
|
||||||
cs::with(|_| {
|
cs::with(|_| {
|
||||||
|
// Make sure all previous writes are visible
|
||||||
|
core::sync::atomic::fence(Ordering::SeqCst);
|
||||||
|
|
||||||
if self.is_popped() {
|
if self.is_popped() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Make sure all previous writes are visible
|
|
||||||
core::sync::atomic::fence(Ordering::SeqCst);
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue