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) \
35−do { \
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−
49−typedef _Bool atomic_flag;
50−typedef _Bool atomic_bool;
51−typedef char atomic_char;
52−typedef signed char atomic_schar;
53−typedef unsigned char atomic_uchar;
54−typedef short atomic_short;
55−typedef unsigned short atomic_ushort;
56−typedef int atomic_int;
57−typedef unsigned int atomic_uint;
58−typedef long atomic_long;
59−typedef unsigned long atomic_ulong;
60−typedef long long atomic_llong;
61−typedef unsigned long long atomic_ullong;
62−typedef wchar_t atomic_wchar_t;
63−typedef int_least8_t atomic_int_least8_t;
64−typedef uint_least8_t atomic_uint_least8_t;
65−typedef int_least16_t atomic_int_least16_t;
66−typedef uint_least16_t atomic_uint_least16_t;
67−typedef int_least32_t atomic_int_least32_t;
68−typedef uint_least32_t atomic_uint_least32_t;
69−typedef int_least64_t atomic_int_least64_t;
70−typedef uint_least64_t atomic_uint_least64_t;
71−typedef int_fast8_t atomic_int_fast8_t;
72−typedef uint_fast8_t atomic_uint_fast8_t;
73−typedef int_fast16_t atomic_int_fast16_t;
74−typedef uint_fast16_t atomic_uint_fast16_t;
75−typedef int_fast32_t atomic_int_fast32_t;
76−typedef uint_fast32_t atomic_uint_fast32_t;
77−typedef int_fast64_t atomic_int_fast64_t;
78−typedef uint_fast64_t atomic_uint_fast64_t;
79−typedef intptr_t atomic_intptr_t;
80−typedef uintptr_t atomic_uintptr_t;
81−typedef size_t atomic_size_t;
82−typedef ptrdiff_t atomic_ptrdiff_t;
83−typedef intmax_t atomic_intmax_t;
84−typedef uintmax_t atomic_uintmax_t;
85−
86−#define atomic_store(object, desired) \
87−do { \
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−
29−static pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER;
30−
31−void avpriv_atomic_lock(void)
32−{
33− pthread_mutex_lock(&atomic_lock);
34−}
35−
36−void 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) \
34−do { \
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−
45−typedef intptr_t atomic_flag;
46−typedef intptr_t atomic_bool;
47−typedef intptr_t atomic_char;
48−typedef intptr_t atomic_schar;
49−typedef intptr_t atomic_uchar;
50−typedef intptr_t atomic_short;
51−typedef intptr_t atomic_ushort;
52−typedef intptr_t atomic_int;
53−typedef intptr_t atomic_uint;
54−typedef intptr_t atomic_long;
55−typedef intptr_t atomic_ulong;
56−typedef intptr_t atomic_llong;
57−typedef intptr_t atomic_ullong;
58−typedef intptr_t atomic_wchar_t;
59−typedef intptr_t atomic_int_least8_t;
60−typedef intptr_t atomic_uint_least8_t;
61−typedef intptr_t atomic_int_least16_t;
62−typedef intptr_t atomic_uint_least16_t;
63−typedef intptr_t atomic_int_least32_t;
64−typedef intptr_t atomic_uint_least32_t;
65−typedef intptr_t atomic_int_least64_t;
66−typedef intptr_t atomic_uint_least64_t;
67−typedef intptr_t atomic_int_fast8_t;
68−typedef intptr_t atomic_uint_fast8_t;
69−typedef intptr_t atomic_int_fast16_t;
70−typedef intptr_t atomic_uint_fast16_t;
71−typedef intptr_t atomic_int_fast32_t;
72−typedef intptr_t atomic_uint_fast32_t;
73−typedef intptr_t atomic_int_fast64_t;
74−typedef intptr_t atomic_uint_fast64_t;
75−typedef intptr_t atomic_intptr_t;
76−typedef intptr_t atomic_uintptr_t;
77−typedef intptr_t atomic_size_t;
78−typedef intptr_t atomic_ptrdiff_t;
79−typedef intptr_t atomic_intmax_t;
80−typedef intptr_t atomic_uintmax_t;
81−
82−void avpriv_atomic_lock(void);
83−void avpriv_atomic_unlock(void);
84−
85−static inline void atomic_thread_fence(int order)
86−{
87− avpriv_atomic_lock();
88− avpriv_atomic_unlock();
89−}
90−
91−static 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−
101−static 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−
113−static 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−
126−static 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) \
152−static 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−
162−FETCH_MODIFY(add, +)
163−FETCH_MODIFY(sub, -)
164−FETCH_MODIFY(or, |)
165−FETCH_MODIFY(xor, ^)
166−FETCH_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) \
32−do { \
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−
46−typedef intptr_t atomic_flag;
47−typedef intptr_t atomic_bool;
48−typedef intptr_t atomic_char;
49−typedef intptr_t atomic_schar;
50−typedef intptr_t atomic_uchar;
51−typedef intptr_t atomic_short;
52−typedef intptr_t atomic_ushort;
53−typedef intptr_t atomic_int;
54−typedef intptr_t atomic_uint;
55−typedef intptr_t atomic_long;
56−typedef intptr_t atomic_ulong;
57−typedef intptr_t atomic_llong;
58−typedef intptr_t atomic_ullong;
59−typedef intptr_t atomic_wchar_t;
60−typedef intptr_t atomic_int_least8_t;
61−typedef intptr_t atomic_uint_least8_t;
62−typedef intptr_t atomic_int_least16_t;
63−typedef intptr_t atomic_uint_least16_t;
64−typedef intptr_t atomic_int_least32_t;
65−typedef intptr_t atomic_uint_least32_t;
66−typedef intptr_t atomic_int_least64_t;
67−typedef intptr_t atomic_uint_least64_t;
68−typedef intptr_t atomic_int_fast8_t;
69−typedef intptr_t atomic_uint_fast8_t;
70−typedef intptr_t atomic_int_fast16_t;
71−typedef intptr_t atomic_uint_fast16_t;
72−typedef intptr_t atomic_int_fast32_t;
73−typedef intptr_t atomic_uint_fast32_t;
74−typedef intptr_t atomic_int_fast64_t;
75−typedef intptr_t atomic_uint_fast64_t;
76−typedef intptr_t atomic_intptr_t;
77−typedef intptr_t atomic_uintptr_t;
78−typedef intptr_t atomic_size_t;
79−typedef intptr_t atomic_ptrdiff_t;
80−typedef intptr_t atomic_intmax_t;
81−typedef intptr_t atomic_uintmax_t;
82−
83−static 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−
92−static 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−
107−static 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−
124−static 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−
132−static 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−
141−static 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−
150−static 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
21192119 "
21202120
21212121 ATOMICS_LIST="
2122− atomics_gcc
2123− atomics_suncc
21242122 atomics_win32
21252123 "
21262124
@@ -2251,13 +2249,10 @@ ARCH_FEATURES=" · 124 unmodified lines
22512249 "
22522250
22532251 BUILTIN_LIST="
2254− atomic_cas_ptr
2255− machine_rw_barrier
22562252 MemoryBarrier
22572253 mm_empty
22582254 rdtsc
22592255 sem_timedwait
2260− sync_val_compare_and_swap
22612256 "
22622257 HAVE_LIST_CMDLINE="
22632258 inline_asm
@@ -2837,8 +2832,6 @@ valgrind_backtrace_conflict="optimizations" · 573 unmodified lines
28372832 valgrind_backtrace_deps="valgrind_valgrind_h"
28382833
28392834 # threading support
2840−atomics_gcc_if="sync_val_compare_and_swap"
2841−atomics_suncc_if="atomic_cas_ptr machine_rw_barrier"
28422835 atomics_win32_if="MemoryBarrier"
28432836 atomics_native_if_any="$ATOMICS_LIST"
28442837 w32threads_deps="atomics_native"
@@ -6528,10 +6521,7 @@ if ! disabled network; then · 3683 unmodified lines
65286521 fi
65296522 fi
65306523
6531−check_builtin atomic_cas_ptr atomic.h "void **ptr; void *oldval, *newval; atomic_cas_ptr(ptr, oldval, newval)"
6532−check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
65336524 check_builtin MemoryBarrier windows.h "MemoryBarrier()"
6534−check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
65356525 check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)"
65366526 check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)"
65376527
@@ -7790,15 +7780,8 @@ for thread in $THREADS_LIST; do · 1252 unmodified lines
77907780 done
77917781
77927782 if disabled stdatomic; then
7793− if enabled atomics_gcc; then
7794− add_cppflags '-I\$(SRC_PATH)/compat/atomics/gcc'
7795− elif enabled atomics_win32; then
7783+ if enabled atomics_win32; then
77967784 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'
78027785 else
78037786 enabled threads && die "Threading is enabled, but no atomics are available"
78047787 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