Revert "fix: more atomic orderings"

This reverts commit 02f4cfe437.
This commit is contained in:
Saber Haj Rabiee
2025-04-03 09:11:14 -07:00
parent e113c79fb8
commit 6006c33307
3 changed files with 5 additions and 5 deletions

View File

@@ -49,8 +49,8 @@ fn can_create_custom_executor() {
let counter = Arc::new(AtomicUsize::new(0));
let counter_clone = Arc::clone(&counter);
Executor::spawn_local(async move {
counter_clone.store(1, Ordering::SeqCst);
counter_clone.store(1, Ordering::Release);
});
Executor::poll_local();
assert_eq!(counter.load(Ordering::SeqCst), 1);
assert_eq!(counter.load(Ordering::Acquire), 1);
}

View File

@@ -26,12 +26,12 @@ fn can_make_local_progress() {
Executor::spawn_local({
let counter = Arc::clone(&counter);
async move {
assert_eq!(counter.fetch_add(1, Ordering::SeqCst), 0);
assert_eq!(counter.fetch_add(1, Ordering::AcqRel), 0);
Executor::spawn_local(async {
// Should not crash
});
}
});
Executor::poll_local();
assert_eq!(counter.load(Ordering::SeqCst), 1);
assert_eq!(counter.load(Ordering::Acquire), 1);
}

View File

@@ -43,7 +43,7 @@ type TitleId = u32;
impl TitleContext {
fn next_id(&self) -> TitleId {
self.id.fetch_add(1, Ordering::SeqCst)
self.id.fetch_add(1, Ordering::Relaxed)
}
fn invalidate(&self) {