aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-12-23 03:41:08 +0100
committerGitHub <noreply@github.com>2020-12-23 03:41:08 +0100
commit52a327c1cbb86c7f2f5c460645889b23615261bf (patch)
treedf67ef901c5300349c073e8031c4d410ba016ca7 /configure
parentFix typos in sysmodule (GH-23883) (diff)
downloadcpython-52a327c1cbb86c7f2f5c460645889b23615261bf.tar.gz
cpython-52a327c1cbb86c7f2f5c460645889b23615261bf.tar.bz2
cpython-52a327c1cbb86c7f2f5c460645889b23615261bf.zip
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')
-rwxr-xr-xconfigure12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure b/configure
index f07edfff266..530c04a0ede 100755
--- a/configure
+++ b/configure
@@ -15429,6 +15429,7 @@ _ACEOF
fi
+
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
@@ -17095,16 +17096,17 @@ $as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
fi
-# Check for GCC >= 4.7 __atomic builtins
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
-$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
+# Check for GCC >= 4.7 and clang __atomic builtin functions
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5
+$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- 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;
}