summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-28 22:37:37 +0200
committerwm4 <wm4@nowhere>2014-05-28 22:44:43 +0200
commit3238cd3dac49d3f961314f16cf689863db0e92e2 (patch)
treee18a550ef3561f3dc771315167d6b9d81f045680 /misc
parentf289060259113c434a8c69a6ef297415fe0d8f58 (diff)
downloadmpv-3238cd3dac49d3f961314f16cf689863db0e92e2.tar.bz2
mpv-3238cd3dac49d3f961314f16cf689863db0e92e2.tar.xz
atomics: some corrections to __sync builtins usage
We don't need to combine __sync_add_and_fetch with a memory barrier, since these intrinsics are documented as using a full barrier already. Use __sync_fetch_and_add instead of __sync_add_and_fetch; this gives atomic_fetch_add() the correct return value (although we don't use it). Use __sync_fetch_and_add to emulate atomic_load(). This should enforce the full barrier semantics better. (This trick is stolen from the FreeBSD based stdatomic.h emulation.)
Diffstat (limited to 'misc')
0 files changed, 0 insertions, 0 deletions