summaryrefslogtreecommitdiffstats
path: root/compat/atomics
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '6a93b596c5c3af31b843d63013a7985ffeea354d'James Almer2017-04-132-2/+3
|\ | | | | | | | | | | | | * commit '6a93b596c5c3af31b843d63013a7985ffeea354d': compat/atomics: add typecasts in atomic_compare_exchange_strong() Merged-by: James Almer <jamrial@gmail.com>
| * compat/atomics: add typecasts in atomic_compare_exchange_strong()Wan-Teh Chang2016-12-082-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Add a compat dummy stdatomic.h used when threading is disabledAnton Khirnov2016-10-021-0/+176
| | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC
| * Add a compat stdatomic.h implementation based on pthreadsAnton Khirnov2016-10-022-0/+236
| | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC
| * Add a compat stdatomic.h implementation based on suncc atomicsAnton Khirnov2016-10-021-0/+186
| | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC
| * Add a compat stdatomic.h implementation based on windows atomicsAnton Khirnov2016-10-021-0/+179
| | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC
| * Add a compat stdatomic.h implementation based on GCC atomicsAnton Khirnov2016-10-021-0/+173
| | | | Adapted from the code by Rémi Denis-Courmont from VLC
* stdatomic/win32: only include the lean windows headers to avoid conflictsHendrik Leppkes2017-04-041-0/+1
|
* compat/atomics: fix atomic_fetch_xorJames Almer2017-04-025-6/+6
|
* compat/atomics/gcc: use __typeof__ instead of typeofJames Almer2017-03-181-4/+4
| | | | | | | | | 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>
* compat/atomics: rename header guardsJames Almer2016-12-025-15/+15
| | | | | | Fixes fate-source. Signed-off-by: James Almer <jamrial@gmail.com>
* Add a compat dummy stdatomic.h used when threading is disabledAnton Khirnov2016-12-021-0/+176
| | | | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC This merges libav commit eb34d40354e2474517c9b9bd787e0dadc89c2a81. Signed-off-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Add a compat stdatomic.h implementation based on pthreadsAnton Khirnov2016-12-022-0/+236
| | | | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC This merges libav commit f9a6a80e065cdb95b233978f1d96ec9bc863daa1. Signed-off-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Add a compat stdatomic.h implementation based on suncc atomicsAnton Khirnov2016-12-021-0/+186
| | | | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC This merges libav commit bb81ed476569b912a37ed553e756e123b6b13b14. Signed-off-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Add a compat stdatomic.h implementation based on windows atomicsAnton Khirnov2016-12-021-0/+179
| | | | | | | | | | Adapted from the code by Rémi Denis-Courmont from VLC This merges libav commit c2755864afadfbaa349e8d583665c86fe99fa90b. Signed-off-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Add a compat stdatomic.h implementation based on GCC atomicsAnton Khirnov2016-12-021-0/+173
Adapted from the code by Rémi Denis-Courmont from VLC This merges libav commit 4e928ef340ac20325f529d92fcbc51e768085358. Signed-off-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: James Almer <jamrial@gmail.com>
OpenPOWER on IntegriCloud