Implement CAS-based 64-bit fetch_add on i686.

This commit is contained in:
4lDO2
2024-06-27 21:29:22 +02:00
parent bda8fe89c6
commit 9609c7bc26
+4
View File
@@ -523,5 +523,9 @@ mod atomic {
self.fetch_update(order, Ordering::Relaxed, |b| Some(b & bits))
.unwrap()
}
pub fn fetch_add(&self, term: u64, order: Ordering) -> u64 {
self.fetch_update(order, Ordering::Relaxed, |b| Some(b.wrapping_add(term)))
.unwrap()
}
}
}