diff options
author | Victor Stinner <vstinner@python.org> | 2020-12-23 02:41:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 02:41:08 (GMT) |
commit | 52a327c1cbb86c7f2f5c460645889b23615261bf (patch) | |
tree | df67ef901c5300349c073e8031c4d410ba016ca7 /configure.ac | |
parent | 46b5c6be29f6470a20dd0dbd34e794debcee7c04 (diff) | |
download | cpython-52a327c1cbb86c7f2f5c460645889b23615261bf.zip cpython-52a327c1cbb86c7f2f5c460645889b23615261bf.tar.gz cpython-52a327c1cbb86c7f2f5c460645889b23615261bf.tar.bz2 |
bpo-39465: Add pycore_atomic_funcs.h header (GH-20766)
Add pycore_atomic_funcs.h internal header file: similar to
pycore_atomic.h but don't require to declare variables as atomic.
Add _Py_atomic_size_get() and _Py_atomic_size_set() functions.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index ee5573c..39eadfe 100644 --- a/configure.ac +++ b/configure.ac @@ -5586,14 +5586,15 @@ if test "$have_stdatomic_h" = yes; then [Has stdatomic.h with atomic_int and atomic_uintptr_t]) fi -# Check for GCC >= 4.7 __atomic builtins -AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins) +# Check for GCC >= 4.7 and clang __atomic builtin functions +AC_MSG_CHECKING(for builtin __atomic_load_n and __atomic_store_n functions) AC_LINK_IFELSE( [ AC_LANG_SOURCE([[ - volatile int val = 1; + int val; int main() { - __atomic_load_n(&val, __ATOMIC_SEQ_CST); + __atomic_store_n(&val, 1, __ATOMIC_SEQ_CST); + (void)__atomic_load_n(&val, __ATOMIC_SEQ_CST); return 0; } ]]) @@ -5602,7 +5603,7 @@ AC_LINK_IFELSE( AC_MSG_RESULT($have_builtin_atomic) if test "$have_builtin_atomic" = yes; then - AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin atomics]) + AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin __atomic_load_n() and __atomic_store_n() functions]) fi # ensurepip option |