aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-12-21 19:58:03 -0800
committerChris Robinson <[email protected]>2016-12-21 19:58:03 -0800
commit4c33818dde702128be13040f9fc8bd0a5b835c76 (patch)
tree27c77c6283e35ec0f4e42d3163174f41018dda00 /OpenAL32/alSource.c
parent315bd556acdc4b8b67b073f64d472f243a96544d (diff)
Avoid duplicating code using a macro
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 9f60c545..e3d3cf1b 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -2913,12 +2913,7 @@ static void UpdateSourceProps(ALsource *source, ALuint num_sends)
/* If there was an unused update container, put it back in the
* freelist.
*/
- struct ALsourceProps *first = ATOMIC_LOAD_SEQ(&source->FreeList);
- do {
- ATOMIC_STORE(&props->next, first, almemory_order_relaxed);
- } while(ATOMIC_COMPARE_EXCHANGE_WEAK(struct ALsourceProps*,
- &source->FreeList, &first, props, almemory_order_acq_rel,
- almemory_order_acquire) == 0);
+ ATOMIC_REPLACE_HEAD(struct ALsourceProps*, &source->FreeList, props);
}
}