History

compat: drop gcc, suncc, and pthreads stdatomic emulation

Since we now require a C11-compliant compiler, there should be no supported configurations where any of these is used.

Anton Khirnov committed 2 years ago

Commit 8c185ef1 parent 6b3f9c25 files · +1 −613Browse files

Unified · Split

5 files
  1. compat/atomics/gcc/stdatomic.h +0 −173
  2. compat/atomics/pthread/stdatomic.c +0 −39
  3. compat/atomics/pthread/stdatomic.h +0 −197
  4. compat/atomics/suncc/stdatomic.h +0 −186
  5. configure +1 −18
compat/atomics/gcc/stdatomic.h+0−173
@@ -1,173 +0,0 @@
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19/*
20 * based on vlc_atomic.h from VLC
21 * Copyright (C) 2010 Rémi Denis-Courmont
22 */
23
24#ifndef COMPAT_ATOMICS_GCC_STDATOMIC_H
25#define COMPAT_ATOMICS_GCC_STDATOMIC_H
26
27#include <stddef.h>
28#include <stdint.h>
29
30#define ATOMIC_FLAG_INIT 0
31
32#define ATOMIC_VAR_INIT(value) (value)
33
34#define atomic_init(obj, value) \
35do { \
36 *(obj) = (value); \
37} while(0)
38
39#define kill_dependency(y) ((void)0)
40
41#define atomic_thread_fence(order) \
42 __sync_synchronize()
43
44#define atomic_signal_fence(order) \
45 ((void)0)
46
47#define atomic_is_lock_free(obj) 0
48
49typedef _Bool atomic_flag;
50typedef _Bool atomic_bool;
51typedef char atomic_char;
52typedef signed char atomic_schar;
53typedef unsigned char atomic_uchar;
54typedef short atomic_short;
55typedef unsigned short atomic_ushort;
56typedef int atomic_int;
57typedef unsigned int atomic_uint;
58typedef long atomic_long;
59typedef unsigned long atomic_ulong;
60typedef long long atomic_llong;
61typedef unsigned long long atomic_ullong;
62typedef wchar_t atomic_wchar_t;
63typedef int_least8_t atomic_int_least8_t;
64typedef uint_least8_t atomic_uint_least8_t;
65typedef int_least16_t atomic_int_least16_t;
66typedef uint_least16_t atomic_uint_least16_t;
67typedef int_least32_t atomic_int_least32_t;
68typedef uint_least32_t atomic_uint_least32_t;
69typedef int_least64_t atomic_int_least64_t;
70typedef uint_least64_t atomic_uint_least64_t;
71typedef int_fast8_t atomic_int_fast8_t;
72typedef uint_fast8_t atomic_uint_fast8_t;
73typedef int_fast16_t atomic_int_fast16_t;
74typedef uint_fast16_t atomic_uint_fast16_t;
75typedef int_fast32_t atomic_int_fast32_t;
76typedef uint_fast32_t atomic_uint_fast32_t;
77typedef int_fast64_t atomic_int_fast64_t;
78typedef uint_fast64_t atomic_uint_fast64_t;
79typedef intptr_t atomic_intptr_t;
80typedef uintptr_t atomic_uintptr_t;
81typedef size_t atomic_size_t;
82typedef ptrdiff_t atomic_ptrdiff_t;
83typedef intmax_t atomic_intmax_t;
84typedef uintmax_t atomic_uintmax_t;
85
86#define atomic_store(object, desired) \
87do { \
88 *(object) = (desired); \
89 __sync_synchronize(); \
90} while (0)
91
92#define atomic_store_explicit(object, desired, order) \
93 atomic_store(object, desired)
94
95#define atomic_load(object) \
96 (__sync_synchronize(), *(object))
97
98#define atomic_load_explicit(object, order) \
99 atomic_load(object)
100
101#define atomic_exchange(object, desired) \
102({ \
103 __typeof__(object) _obj = (object); \
104 __typeof__(*object) _old; \
105 do \
106 _old = atomic_load(_obj); \
107 while (!__sync_bool_compare_and_swap(_obj, _old, (desired))); \
108 _old; \
109})
110
111#define atomic_exchange_explicit(object, desired, order) \
112 atomic_exchange(object, desired)
113
114#define atomic_compare_exchange_strong(object, expected, desired) \
115({ \
116 __typeof__(object) _exp = (expected); \
117 __typeof__(*object) _old = *_exp; \
118 *_exp = __sync_val_compare_and_swap((object), _old, (desired)); \
119 *_exp == _old; \
120})
121
122#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \
123 atomic_compare_exchange_strong(object, expected, desired)
124
125#define atomic_compare_exchange_weak(object, expected, desired) \
126 atomic_compare_exchange_strong(object, expected, desired)
127
128#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \
129 atomic_compare_exchange_weak(object, expected, desired)
130
131#define atomic_fetch_add(object, operand) \
132 __sync_fetch_and_add(object, operand)
133
134#define atomic_fetch_add_explicit(object, operand, order) \
135 atomic_fetch_add(object, operand)
136
137#define atomic_fetch_sub(object, operand) \
138 __sync_fetch_and_sub(object, operand)
139
140#define atomic_fetch_sub_explicit(object, operand, order) \
141 atomic_fetch_sub(object, operand)
142
143#define atomic_fetch_or(object, operand) \
144 __sync_fetch_and_or(object, operand)
145
146#define atomic_fetch_or_explicit(object, operand, order) \
147 atomic_fetch_or(object, operand)
148
149#define atomic_fetch_xor(object, operand) \
150 __sync_fetch_and_xor(object, operand)
151
152#define atomic_fetch_xor_explicit(object, operand, order) \
153 atomic_fetch_xor(object, operand)
154
155#define atomic_fetch_and(object, operand) \
156 __sync_fetch_and_and(object, operand)
157
158#define atomic_fetch_and_explicit(object, operand, order) \
159 atomic_fetch_and(object, operand)
160
161#define atomic_flag_test_and_set(object) \
162 atomic_exchange(object, 1)
163
164#define atomic_flag_test_and_set_explicit(object, order) \
165 atomic_flag_test_and_set(object)
166
167#define atomic_flag_clear(object) \
168 atomic_store(object, 0)
169
170#define atomic_flag_clear_explicit(object, order) \
171 atomic_flag_clear(object)
172
173#endif /* COMPAT_ATOMICS_GCC_STDATOMIC_H */
compat/atomics/pthread/stdatomic.c+0−39
@@ -1,39 +0,0 @@
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19/*
20 * based on vlc_atomic.h from VLC
21 * Copyright (C) 2010 Rémi Denis-Courmont
22 */
23
24#include <pthread.h>
25#include <stdint.h>
26
27#include "stdatomic.h"
28
29static pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER;
30
31void avpriv_atomic_lock(void)
32{
33 pthread_mutex_lock(&atomic_lock);
34}
35
36void avpriv_atomic_unlock(void)
37{
38 pthread_mutex_unlock(&atomic_lock);
39}
compat/atomics/pthread/stdatomic.h+0−197
@@ -1,197 +0,0 @@
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19/*
20 * based on vlc_atomic.h from VLC
21 * Copyright (C) 2010 Rémi Denis-Courmont
22 */
23
24#ifndef COMPAT_ATOMICS_PTHREAD_STDATOMIC_H
25#define COMPAT_ATOMICS_PTHREAD_STDATOMIC_H
26
27#include <stdint.h>
28
29#define ATOMIC_FLAG_INIT 0
30
31#define ATOMIC_VAR_INIT(value) (value)
32
33#define atomic_init(obj, value) \
34do { \
35 *(obj) = (value); \
36} while(0)
37
38#define kill_dependency(y) ((void)0)
39
40#define atomic_signal_fence(order) \
41 ((void)0)
42
43#define atomic_is_lock_free(obj) 0
44
45typedef intptr_t atomic_flag;
46typedef intptr_t atomic_bool;
47typedef intptr_t atomic_char;
48typedef intptr_t atomic_schar;
49typedef intptr_t atomic_uchar;
50typedef intptr_t atomic_short;
51typedef intptr_t atomic_ushort;
52typedef intptr_t atomic_int;
53typedef intptr_t atomic_uint;
54typedef intptr_t atomic_long;
55typedef intptr_t atomic_ulong;
56typedef intptr_t atomic_llong;
57typedef intptr_t atomic_ullong;
58typedef intptr_t atomic_wchar_t;
59typedef intptr_t atomic_int_least8_t;
60typedef intptr_t atomic_uint_least8_t;
61typedef intptr_t atomic_int_least16_t;
62typedef intptr_t atomic_uint_least16_t;
63typedef intptr_t atomic_int_least32_t;
64typedef intptr_t atomic_uint_least32_t;
65typedef intptr_t atomic_int_least64_t;
66typedef intptr_t atomic_uint_least64_t;
67typedef intptr_t atomic_int_fast8_t;
68typedef intptr_t atomic_uint_fast8_t;
69typedef intptr_t atomic_int_fast16_t;
70typedef intptr_t atomic_uint_fast16_t;
71typedef intptr_t atomic_int_fast32_t;
72typedef intptr_t atomic_uint_fast32_t;
73typedef intptr_t atomic_int_fast64_t;
74typedef intptr_t atomic_uint_fast64_t;
75typedef intptr_t atomic_intptr_t;
76typedef intptr_t atomic_uintptr_t;
77typedef intptr_t atomic_size_t;
78typedef intptr_t atomic_ptrdiff_t;
79typedef intptr_t atomic_intmax_t;
80typedef intptr_t atomic_uintmax_t;
81
82void avpriv_atomic_lock(void);
83void avpriv_atomic_unlock(void);
84
85static inline void atomic_thread_fence(int order)
86{
87 avpriv_atomic_lock();
88 avpriv_atomic_unlock();
89}
90
91static inline void atomic_store(intptr_t *object, intptr_t desired)
92{
93 avpriv_atomic_lock();
94 *object = desired;
95 avpriv_atomic_unlock();
96}
97
98#define atomic_store_explicit(object, desired, order) \
99 atomic_store(object, desired)
100
101static inline intptr_t atomic_load(intptr_t *object)
102{
103 intptr_t ret;
104 avpriv_atomic_lock();
105 ret = *object;
106 avpriv_atomic_unlock();
107 return ret;
108}
109
110#define atomic_load_explicit(object, order) \
111 atomic_load(object)
112
113static inline intptr_t atomic_exchange(intptr_t *object, intptr_t desired)
114{
115 intptr_t ret;
116 avpriv_atomic_lock();
117 ret = *object;
118 *object = desired;
119 avpriv_atomic_unlock();
120 return ret;
121}
122
123#define atomic_exchange_explicit(object, desired, order) \
124 atomic_exchange(object, desired)
125
126static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected,
127 intptr_t desired)
128{
129 int ret;
130 avpriv_atomic_lock();
131 if (*object == *expected) {
132 ret = 1;
133 *object = desired;
134 } else {
135 ret = 0;
136 *expected = *object;
137 }
138 avpriv_atomic_unlock();
139 return ret;
140}
141
142#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \
143 atomic_compare_exchange_strong(object, expected, desired)
144
145#define atomic_compare_exchange_weak(object, expected, desired) \
146 atomic_compare_exchange_strong(object, expected, desired)
147
148#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \
149 atomic_compare_exchange_weak(object, expected, desired)
150
151#define FETCH_MODIFY(opname, op) \
152static inline intptr_t atomic_fetch_ ## opname(intptr_t *object, intptr_t operand) \
153{ \
154 intptr_t ret; \
155 avpriv_atomic_lock(); \
156 ret = *object; \
157 *object = *object op operand; \
158 avpriv_atomic_unlock(); \
159 return ret; \
160}
161
162FETCH_MODIFY(add, +)
163FETCH_MODIFY(sub, -)
164FETCH_MODIFY(or, |)
165FETCH_MODIFY(xor, ^)
166FETCH_MODIFY(and, &)
167
168#undef FETCH_MODIFY
169
170#define atomic_fetch_add_explicit(object, operand, order) \
171 atomic_fetch_add(object, operand)
172
173#define atomic_fetch_sub_explicit(object, operand, order) \
174 atomic_fetch_sub(object, operand)
175
176#define atomic_fetch_or_explicit(object, operand, order) \
177 atomic_fetch_or(object, operand)
178
179#define atomic_fetch_xor_explicit(object, operand, order) \
180 atomic_fetch_xor(object, operand)
181
182#define atomic_fetch_and_explicit(object, operand, order) \
183 atomic_fetch_and(object, operand)
184
185#define atomic_flag_test_and_set(object) \
186 atomic_exchange(object, 1)
187
188#define atomic_flag_test_and_set_explicit(object, order) \
189 atomic_flag_test_and_set(object)
190
191#define atomic_flag_clear(object) \
192 atomic_store(object, 0)
193
194#define atomic_flag_clear_explicit(object, order) \
195 atomic_flag_clear(object)
196
197#endif /* COMPAT_ATOMICS_PTHREAD_STDATOMIC_H */
compat/atomics/suncc/stdatomic.h+0−186
@@ -1,186 +0,0 @@
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef COMPAT_ATOMICS_SUNCC_STDATOMIC_H
20#define COMPAT_ATOMICS_SUNCC_STDATOMIC_H
21
22#include <atomic.h>
23#include <mbarrier.h>
24#include <stddef.h>
25#include <stdint.h>
26
27#define ATOMIC_FLAG_INIT 0
28
29#define ATOMIC_VAR_INIT(value) (value)
30
31#define atomic_init(obj, value) \
32do { \
33 *(obj) = (value); \
34} while(0)
35
36#define kill_dependency(y) ((void)0)
37
38#define atomic_thread_fence(order) \
39 __machine_rw_barrier();
40
41#define atomic_signal_fence(order) \
42 ((void)0)
43
44#define atomic_is_lock_free(obj) 0
45
46typedef intptr_t atomic_flag;
47typedef intptr_t atomic_bool;
48typedef intptr_t atomic_char;
49typedef intptr_t atomic_schar;
50typedef intptr_t atomic_uchar;
51typedef intptr_t atomic_short;
52typedef intptr_t atomic_ushort;
53typedef intptr_t atomic_int;
54typedef intptr_t atomic_uint;
55typedef intptr_t atomic_long;
56typedef intptr_t atomic_ulong;
57typedef intptr_t atomic_llong;
58typedef intptr_t atomic_ullong;
59typedef intptr_t atomic_wchar_t;
60typedef intptr_t atomic_int_least8_t;
61typedef intptr_t atomic_uint_least8_t;
62typedef intptr_t atomic_int_least16_t;
63typedef intptr_t atomic_uint_least16_t;
64typedef intptr_t atomic_int_least32_t;
65typedef intptr_t atomic_uint_least32_t;
66typedef intptr_t atomic_int_least64_t;
67typedef intptr_t atomic_uint_least64_t;
68typedef intptr_t atomic_int_fast8_t;
69typedef intptr_t atomic_uint_fast8_t;
70typedef intptr_t atomic_int_fast16_t;
71typedef intptr_t atomic_uint_fast16_t;
72typedef intptr_t atomic_int_fast32_t;
73typedef intptr_t atomic_uint_fast32_t;
74typedef intptr_t atomic_int_fast64_t;
75typedef intptr_t atomic_uint_fast64_t;
76typedef intptr_t atomic_intptr_t;
77typedef intptr_t atomic_uintptr_t;
78typedef intptr_t atomic_size_t;
79typedef intptr_t atomic_ptrdiff_t;
80typedef intptr_t atomic_intmax_t;
81typedef intptr_t atomic_uintmax_t;
82
83static inline void atomic_store(intptr_t *object, intptr_t desired)
84{
85 *object = desired;
86 __machine_rw_barrier();
87}
88
89#define atomic_store_explicit(object, desired, order) \
90 atomic_store(object, desired)
91
92static inline intptr_t atomic_load(intptr_t *object)
93{
94 __machine_rw_barrier();
95 return *object;
96}
97
98#define atomic_load_explicit(object, order) \
99 atomic_load(object)
100
101#define atomic_exchange(object, desired) \
102 atomic_swap_ptr(object, desired)
103
104#define atomic_exchange_explicit(object, desired, order) \
105 atomic_exchange(object, desired)
106
107static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected,
108 intptr_t desired)
109{
110 intptr_t old = *expected;
111 *expected = (intptr_t)atomic_cas_ptr(object, (void *)old, (void *)desired);
112 return *expected == old;
113}
114
115#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \
116 atomic_compare_exchange_strong(object, expected, desired)
117
118#define atomic_compare_exchange_weak(object, expected, desired) \
119 atomic_compare_exchange_strong(object, expected, desired)
120
121#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \
122 atomic_compare_exchange_weak(object, expected, desired)
123
124static inline intptr_t atomic_fetch_add(intptr_t *object, intptr_t operand)
125{
126 return atomic_add_ptr_nv(object, operand) - operand;
127}
128
129#define atomic_fetch_sub(object, operand) \
130 atomic_fetch_add(object, -(operand))
131
132static inline intptr_t atomic_fetch_or(intptr_t *object, intptr_t operand)
133{
134 intptr_t old;
135 do {
136 old = atomic_load(object);
137 } while (!atomic_compare_exchange_strong(object, old, old | operand));
138 return old;
139}
140
141static inline intptr_t atomic_fetch_xor(intptr_t *object, intptr_t operand)
142{
143 intptr_t old;
144 do {
145 old = atomic_load(object);
146 } while (!atomic_compare_exchange_strong(object, old, old ^ operand));
147 return old;
148}
149
150static inline intptr_t atomic_fetch_and(intptr_t *object, intptr_t operand)
151{
152 intptr_t old;
153 do {
154 old = atomic_load(object);
155 } while (!atomic_compare_exchange_strong(object, old, old & operand));
156 return old;
157}
158
159#define atomic_fetch_add_explicit(object, operand, order) \
160 atomic_fetch_add(object, operand)
161
162#define atomic_fetch_sub_explicit(object, operand, order) \
163 atomic_fetch_sub(object, operand)
164
165#define atomic_fetch_or_explicit(object, operand, order) \
166 atomic_fetch_or(object, operand)
167
168#define atomic_fetch_xor_explicit(object, operand, order) \
169 atomic_fetch_xor(object, operand)
170
171#define atomic_fetch_and_explicit(object, operand, order) \
172 atomic_fetch_and(object, operand)
173
174#define atomic_flag_test_and_set(object) \
175 atomic_exchange(object, 1)
176
177#define atomic_flag_test_and_set_explicit(object, order) \
178 atomic_flag_test_and_set(object)
179
180#define atomic_flag_clear(object) \
181 atomic_store(object, 0)
182
183#define atomic_flag_clear_explicit(object, order) \
184 atomic_flag_clear(object)
185
186#endif /* COMPAT_ATOMICS_SUNCC_STDATOMIC_H */
configure+1−18
@@ -2119,8 +2119,6 @@ THREADS_LIST=" · 2118 unmodified lines
2119"2119"
2120 2120
2121ATOMICS_LIST="2121ATOMICS_LIST="
2122 atomics_gcc
2123 atomics_suncc
2124 atomics_win322122 atomics_win32
2125"2123"
2126 2124
@@ -2251,13 +2249,10 @@ ARCH_FEATURES=" · 124 unmodified lines
2251"2249"
2252 2250
2253BUILTIN_LIST="2251BUILTIN_LIST="
2254 atomic_cas_ptr
2255 machine_rw_barrier
2256 MemoryBarrier2252 MemoryBarrier
2257 mm_empty2253 mm_empty
2258 rdtsc2254 rdtsc
2259 sem_timedwait2255 sem_timedwait
2260 sync_val_compare_and_swap
2261"2256"
2262HAVE_LIST_CMDLINE="2257HAVE_LIST_CMDLINE="
2263 inline_asm2258 inline_asm
@@ -2837,8 +2832,6 @@ valgrind_backtrace_conflict="optimizations" · 573 unmodified lines
2837valgrind_backtrace_deps="valgrind_valgrind_h"2832valgrind_backtrace_deps="valgrind_valgrind_h"
2838 2833
2839# threading support2834# threading support
2840atomics_gcc_if="sync_val_compare_and_swap"
2841atomics_suncc_if="atomic_cas_ptr machine_rw_barrier"
2842atomics_win32_if="MemoryBarrier"2835atomics_win32_if="MemoryBarrier"
2843atomics_native_if_any="$ATOMICS_LIST"2836atomics_native_if_any="$ATOMICS_LIST"
2844w32threads_deps="atomics_native"2837w32threads_deps="atomics_native"
@@ -6528,10 +6521,7 @@ if ! disabled network; then · 3683 unmodified lines
6528 fi6521 fi
6529fi6522fi
6530 6523
6531check_builtin atomic_cas_ptr atomic.h "void **ptr; void *oldval, *newval; atomic_cas_ptr(ptr, oldval, newval)"
6532check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
6533check_builtin MemoryBarrier windows.h "MemoryBarrier()"6524check_builtin MemoryBarrier windows.h "MemoryBarrier()"
6534check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
6535check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"6525check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"
6536check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)"6526check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)"
6537 6527
@@ -7790,15 +7780,8 @@ for thread in $THREADS_LIST; do · 1252 unmodified lines
7790done7780done
7791 7781
7792if disabled stdatomic; then7782if disabled stdatomic; then
7793 if enabled atomics_gcc; then7783 if enabled atomics_win32; then
7794 add_cppflags '-I\$(SRC_PATH)/compat/atomics/gcc'
7795 elif enabled atomics_win32; then
7796 add_cppflags '-I\$(SRC_PATH)/compat/atomics/win32'7784 add_cppflags '-I\$(SRC_PATH)/compat/atomics/win32'
7797 elif enabled atomics_suncc; then
7798 add_cppflags '-I\$(SRC_PATH)/compat/atomics/suncc'
7799 elif enabled pthreads; then
7800 add_compat atomics/pthread/stdatomic.o
7801 add_cppflags '-I\$(SRC_PATH)/compat/atomics/pthread'
7802 else7785 else
7803 enabled threads && die "Threading is enabled, but no atomics are available"7786 enabled threads && die "Threading is enabled, but no atomics are available"
7804 add_cppflags '-I\$(SRC_PATH)/compat/atomics/dummy'7787 add_cppflags '-I\$(SRC_PATH)/compat/atomics/dummy'

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t