From a7fc69b7cc3ebb08ed72c41e873ae7c5f2451731 Mon Sep 17 00:00:00 2001 From: AtariDreams <83477269+AtariDreams@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:11:58 -0500 Subject: [PATCH] Fix the failure memory order argument to atomic_compare_exchange_strong_explicit The failure memory order cannot be release or acq_rel. Clang since llvm/llvm-project@fed5644 diagnoses an invalid argument. --- Lilu/Headers/kern_util.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lilu/Headers/kern_util.hpp b/Lilu/Headers/kern_util.hpp index 259d5c83..c9d298fc 100644 --- a/Lilu/Headers/kern_util.hpp +++ b/Lilu/Headers/kern_util.hpp @@ -709,7 +709,7 @@ class ThreadLocal { for (size_t i = 0; ptr == nullptr && i < N; i++) { thread_t nullThread = nullptr; if (atomic_compare_exchange_strong_explicit(&threads[i], &nullThread, currThread, - memory_order_acq_rel, memory_order_acq_rel)) + memory_order_acq_rel, memory_order_acquire)) ptr = &values[i]; }