eab5d29810
Merge commit '6a93b596c5c3af31b843d63013a7985ffeea354d'
...
* commit '6a93b596c5c3af31b843d63013a7985ffeea354d':
compat/atomics: add typecasts in atomic_compare_exchange_strong()
Merged-by: James Almer <jamrial@gmail.com >
2017-04-13 18:27:20 -03:00
9ac1e88436
stdatomic/win32: only include the lean windows headers to avoid conflicts
2017-04-04 09:33:23 +02:00
7942907878
compat/atomics: fix atomic_fetch_xor
2017-04-02 00:57:17 -03:00
824d4062a1
compat/atomics/gcc: use __typeof__ instead of typeof
...
The typeof keyword is apparently not available when using the -std=c99 option.
Fixes the use of C11 atomic functions with old GCC.
Reviewed-by: Muhammad Faiz <mfcc64@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2017-03-18 12:13:46 -03:00
6a93b596c5
compat/atomics: add typecasts in atomic_compare_exchange_strong()
...
The Solaris and Windows emulations of atomic_compare_exchange_strong()
need typecasts to avoid compiler warnings, because the functions they
call expect a void* pointer but an intptr_t integer is passed.
Note that the emulations of atomic_compare_exchange_strong() (except
the gcc version) only work for atomic_intptr_t because of the type of
the second argument (|expected|). See
http://en.cppreference.com/w/c/atomic :
_Bool atomic_compare_exchange_strong( volatile A* obj,
C* expected, C desired );
The types of the first argument and second argument are different
(|A| and |C|, respectively). |C| is the non-atomic type corresponding
to |A|. In the emulations of atomic_compare_exchange_strong(), |C| is
intptr_t. This implies |A| can only be sig_intptr_t.
Signed-off-by: Wan-Teh Chang <wtc@google.com >
2016-12-08 15:53:58 -05:00
f88c8e0dc3
compat/atomics: rename header guards
...
Fixes fate-source.
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-02 20:08:54 -03:00
41e891e89e
Add a compat dummy stdatomic.h used when threading is disabled
...
Adapted from the code by Rémi Denis-Courmont from VLC
This merges libav commit eb34d40354
.
Signed-off-by: Wan-Teh Chang <wtc@google.com >
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-02 16:25:18 -03:00
74b5f10862
Add a compat stdatomic.h implementation based on pthreads
...
Adapted from the code by Rémi Denis-Courmont from VLC
This merges libav commit f9a6a80e06
.
Signed-off-by: Wan-Teh Chang <wtc@google.com >
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-02 16:25:18 -03:00
70faadc826
Add a compat stdatomic.h implementation based on suncc atomics
...
Adapted from the code by Rémi Denis-Courmont from VLC
This merges libav commit bb81ed4765
.
Signed-off-by: Wan-Teh Chang <wtc@google.com >
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-02 16:25:18 -03:00
c91e72ed52
Add a compat stdatomic.h implementation based on windows atomics
...
Adapted from the code by Rémi Denis-Courmont from VLC
This merges libav commit c2755864af
.
Signed-off-by: Wan-Teh Chang <wtc@google.com >
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-02 16:25:17 -03:00
3359eede8f
Add a compat stdatomic.h implementation based on GCC atomics
...
Adapted from the code by Rémi Denis-Courmont from VLC
This merges libav commit 4e928ef340
.
Signed-off-by: Wan-Teh Chang <wtc@google.com >
Reviewed-by: wm4 <nfxjfg@googlemail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2016-12-02 16:25:17 -03:00
eb34d40354
Add a compat dummy stdatomic.h used when threading is disabled
...
Adapted from the code by Rémi Denis-Courmont from VLC
2016-10-02 18:57:56 +02:00
f9a6a80e06
Add a compat stdatomic.h implementation based on pthreads
...
Adapted from the code by Rémi Denis-Courmont from VLC
2016-10-02 18:56:52 +02:00
bb81ed4765
Add a compat stdatomic.h implementation based on suncc atomics
...
Adapted from the code by Rémi Denis-Courmont from VLC
2016-10-02 18:55:41 +02:00
c2755864af
Add a compat stdatomic.h implementation based on windows atomics
...
Adapted from the code by Rémi Denis-Courmont from VLC
2016-10-02 18:54:28 +02:00
4e928ef340
Add a compat stdatomic.h implementation based on GCC atomics
...
Adapted from the code by Rémi Denis-Courmont from VLC
2016-10-02 18:52:08 +02:00