diff options
author | Chris Robinson <[email protected]> | 2016-12-20 20:49:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-12-20 20:49:37 -0800 |
commit | 8f581c0e66e52a6f24e85763b39ed3be29a3e792 (patch) | |
tree | dbc69819f46379d6fb99261b3663bad5e521e197 /Alc/helpers.c | |
parent | 19ba71e767041c4f4b5f2f376ea0136c12dec2e7 (diff) |
Use separate macros for atomics that don't take a memory order
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r-- | Alc/helpers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c index 0a6982e9..ef0c8e88 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -558,7 +558,7 @@ vector_al_string SearchDataFiles(const char *ext, const char *subdir) vector_al_string results = VECTOR_INIT_STATIC(); size_t i; - while(ATOMIC_EXCHANGE(uint, &search_lock, 1) == 1) + while(ATOMIC_EXCHANGE_SEQ(uint, &search_lock, 1) == 1) althrd_yield(); /* If the path is absolute, use it directly. */ @@ -629,7 +629,7 @@ vector_al_string SearchDataFiles(const char *ext, const char *subdir) al_string_deinit(&path); } - ATOMIC_STORE(&search_lock, 0); + ATOMIC_STORE_SEQ(&search_lock, 0); return results; } @@ -834,7 +834,7 @@ vector_al_string SearchDataFiles(const char *ext, const char *subdir) static RefCount search_lock; vector_al_string results = VECTOR_INIT_STATIC(); - while(ATOMIC_EXCHANGE(uint, &search_lock, 1) == 1) + while(ATOMIC_EXCHANGE_SEQ(uint, &search_lock, 1) == 1) althrd_yield(); if(subdir[0] == '/') @@ -903,7 +903,7 @@ vector_al_string SearchDataFiles(const char *ext, const char *subdir) al_string_deinit(&path); } - ATOMIC_STORE(&search_lock, 0); + ATOMIC_STORE_SEQ(&search_lock, 0); return results; } |