Add AO_DISABLE_GCC_ATOMICS, AO_PREFER_BUILTIN_ATOMICS macros to configure
authorIvan Maidanski <ivmai@mail.ru>
Tue, 19 Apr 2016 06:23:44 +0000 (09:23 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 19 Apr 2016 06:23:44 +0000 (09:23 +0300)
* configure.ac (AO_DISABLE_GCC_ATOMICS, AO_PREFER_BUILTIN_ATOMICS):
Declare and document (using AH_TEMPLATE).

configure.ac

index 32764aa..758cd58 100644 (file)
@@ -143,6 +143,12 @@ AH_TEMPLATE([AO_USE_SYNC_CAS_BUILTIN],
 AH_TEMPLATE([AO_WEAK_DOUBLE_CAS_EMULATION],
         [Emulate double-width CAS via pthread locking in case of no hardware \
          support (only gcc/x86_64, the emulation is unsafe)])
+AH_TEMPLATE([AO_DISABLE_GCC_ATOMICS],
+        [Do not use C11 atomic intrinsics even if available])
+AH_TEMPLATE([AO_PREFER_BUILTIN_ATOMICS],
+        [Prefer C11 atomic intrinsics over assembly-based implementation \
+        even in case of inefficient implementation (do not use assembly for \
+        any atomic_ops primitive if C11/GCC atomic intrinsics available)])
 
 AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.])