From f3002eaa7c9cc4ff2df03afdca5380e6ff08ce59 Mon Sep 17 00:00:00 2001 From: Antonis Geralis <43617260+planetis-m@users.noreply.github.com> Date: Mon, 2 Jan 2023 17:18:40 +0200 Subject: [PATCH] use relaced ordering --- examples/core/core_loading_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/core/core_loading_thread.c b/examples/core/core_loading_thread.c index cd919ad41..5a988bb27 100644 --- a/examples/core/core_loading_thread.c +++ b/examples/core/core_loading_thread.c @@ -69,7 +69,7 @@ int main(void) case STATE_LOADING: { framesCounter++; - if (atomic_load_explicit(&dataLoaded, memory_order_acquire)) + if (atomic_load_explicit(&dataLoaded, memory_order_relaxed)) { framesCounter = 0; int error = pthread_join(threadId, NULL); @@ -149,7 +149,7 @@ static void *LoadDataThread(void *arg) } // When data has finished loading, we set global variable - atomic_store_explicit(&dataLoaded, true, memory_order_release); + atomic_store_explicit(&dataLoaded, true, memory_order_relaxed); return NULL; }