Use atomics for thread cancellation

This commit is contained in:
Cameron Gutman committed 2026-11-10 23:34:03 -06:00
1 parent 7d884fadc3
commit c3360b7102
2 files changed
+8 -6

No files matched your search

+2 -2
View File
@@ -211,11 +211,11 @@ void PltDetachThread(PLT_THREAD* thread) {
}
bool PltIsThreadInterrupted(PLT_THREAD* thread) {
return thread->cancelled;
return atomic_load_explicit(&thread->cancelled, memory_order_acquire);
}
void PltInterruptThread(PLT_THREAD* thread) {
thread->cancelled = true;
atomic_store_explicit(&thread->cancelled, true, memory_order_release);
}
#ifdef __WIIU__