]> git.sesse.net Git - vlc/commit
Rewrite vlc_atomic_* using the new atomic operations
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 11 May 2012 17:43:32 +0000 (20:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 11 May 2012 17:55:38 +0000 (20:55 +0300)
commit535e8b60f17a11c967aa8d8ea8458a000f7cbf63
tree8925e1bf4a9c606daebfe37f98c732b78fa62b46
parentad3586579f956b6856d2f7c0c4cbd860fd8241af
Rewrite vlc_atomic_* using the new atomic operations

This way, the official atomic functions will be used when available,
rather than VLC's own implementation.

This commit also enables proper atomic operations on some platforms
or with some toolchains. __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 is not
defined on some platforms such as ARM Linux, nor by other compilers
than GCC such as LLVM/clang. Then atomic operations wrongly fell
back to the lame mutex-based implementation.

This will break support for some old compilers and old or irrelevant
instruction set architectures. They would need to provide replacement
for the Intel-originated __sync_* builtin functions.
include/vlc_atomic.h
src/Makefile.am
src/libvlccore.sym
src/misc/atomic.c [deleted file]
src/win32/atomic.c [deleted file]