mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 15:22:09 +00:00
3238cd3dac
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.) |
||
---|---|---|
.. | ||
atomics.h | ||
compiler.h | ||
libav.h | ||
mpbswap.h |