@@ -71,6+71,10 @@ AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([The compiler does not s
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
+# Check if the selected C compiler supports atomic builtins
+AE_CC_ATOMIC_BUILTINS
+
+
## ##
## C++ compiler checks ##
## ##
## ##
## C++ compiler checks ##
## ##
@@ -230,6+234,11 @@ AE_FEATURE([rcu-debug], [Enable internal debugging self-checks. Introduces a per
AE_FEATURE_DEFAULT_DISABLE
AE_FEATURE([cds-lfht-iter-debug], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.])
AE_FEATURE_DEFAULT_DISABLE
AE_FEATURE([cds-lfht-iter-debug], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.])
+# Use compiler atomic builtins, when disabled use our legacy uatomic implementation.
+# Disabled by default
+AE_FEATURE_DEFAULT_DISABLE
+AE_FEATURE([compiler-atomic-builtins], [Enable the use of compiler atomic builtins.])
+
# When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS.
# Disabled by default
AE_FEATURE_DEFAULT_DISABLE
# When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS.
AC_DEFINE([CONFIG_CDS_LFHT_ITER_DEBUG], [1], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.])
])
AC_DEFINE([CONFIG_CDS_LFHT_ITER_DEBUG], [1], [Enable extra debugging checks for lock-free hash table iterator traversal. Alters the rculfhash ABI. Make sure to compile both library and application with matching configuration.])