This reverts commit faa9d29829.
This change became superfluous when support for C11 atomics was introduced.
Reverting it will make the removal of this implementation in an upcoming
merge conflict free.
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
__sync built-ins are considered legacy and will be deprecated.
These new memory model aware built-ins have been available since GCC 4.7.0
Use them by default when available except for __atomic_compare_exchange_n(),
which is slower, and is instead implemented as a fallback for when and if gcc
removes the legacy __sync built-ins.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
On the current code, armcc will fail with:
"libavutil/atomic_gcc.h", line 52: Error: #2771: first argument must be
a pointer to integer or enumeration type
This makes them pass standalone compilation tests. Previously,
they included atomic.h which included themselves again, leading to
double definitions.
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes them pass standalone compilation tests. Previously,
they included atomic.h which included themselves again, leading to
double definitions.
Signed-off-by: Martin Storsjö <martin@martin.st>
These could be used for reference counting, or for keeping track of
decoding progress in references in multithreaded decoders.
Support is provided by gcc/msvc/suncc intrinsics, with a fallback using
pthread mutexes.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This will be useful to test more aggressively for failures to mark XMM
registers as clobbered in Win64 builds, and prevent regressions thereof.
Based on a patch by Ramiro Polla <ramiro.polla@gmail.com>
Two macros (WRITE_ARRAY and WRITE_ARRAY_2D) take the prefix (modifiers)
(not all tables are static, and they might not be constant either), the
type, and the name of the array. It'll be copied with same name and type,
and with the correct size of the currently-defined object.
Originally committed as revision 23821 to svn://svn.ffmpeg.org/ffmpeg/trunk