diff options
author | Chris Robinson <[email protected]> | 2016-12-21 19:58:03 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-12-21 19:58:03 -0800 |
commit | 4c33818dde702128be13040f9fc8bd0a5b835c76 (patch) | |
tree | 27c77c6283e35ec0f4e42d3163174f41018dda00 /OpenAL32/alListener.c | |
parent | 315bd556acdc4b8b67b073f64d472f243a96544d (diff) |
Avoid duplicating code using a macro
Diffstat (limited to 'OpenAL32/alListener.c')
-rw-r--r-- | OpenAL32/alListener.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/OpenAL32/alListener.c b/OpenAL32/alListener.c index f05c20d1..9c237e99 100644 --- a/OpenAL32/alListener.c +++ b/OpenAL32/alListener.c @@ -506,10 +506,6 @@ void UpdateListenerProps(ALCcontext *context) /* If there was an unused update container, put it back in the * freelist. */ - struct ALlistenerProps *first = ATOMIC_LOAD_SEQ(&listener->FreeList); - do { - ATOMIC_STORE(&props->next, first, almemory_order_relaxed); - } while(ATOMIC_COMPARE_EXCHANGE_WEAK_SEQ(struct ALlistenerProps*, - &listener->FreeList, &first, props) == 0); + ATOMIC_REPLACE_HEAD(struct ALlistenerProps*, &listener->FreeList, props); } } |