use relaced ordering
This commit is contained in:
parent
56de0686d0
commit
f3002eaa7c
|
|
@ -69,7 +69,7 @@ int main(void)
|
||||||
case STATE_LOADING:
|
case STATE_LOADING:
|
||||||
{
|
{
|
||||||
framesCounter++;
|
framesCounter++;
|
||||||
if (atomic_load_explicit(&dataLoaded, memory_order_acquire))
|
if (atomic_load_explicit(&dataLoaded, memory_order_relaxed))
|
||||||
{
|
{
|
||||||
framesCounter = 0;
|
framesCounter = 0;
|
||||||
int error = pthread_join(threadId, NULL);
|
int error = pthread_join(threadId, NULL);
|
||||||
|
|
@ -149,7 +149,7 @@ static void *LoadDataThread(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
// When data has finished loading, we set global variable
|
// 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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user