From: Ivan Maidanski Date: Tue, 19 Apr 2016 06:23:44 +0000 (+0300) Subject: Add AO_DISABLE_GCC_ATOMICS, AO_PREFER_BUILTIN_ATOMICS macros to configure X-Git-Tag: v7.6.0~215 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30c0456f7568b4b9e6212f1a05b863dd18c4e471;p=libatomic_ops Add AO_DISABLE_GCC_ATOMICS, AO_PREFER_BUILTIN_ATOMICS macros to configure * configure.ac (AO_DISABLE_GCC_ATOMICS, AO_PREFER_BUILTIN_ATOMICS): Declare and document (using AH_TEMPLATE). --- diff --git a/configure.ac b/configure.ac index 32764aa..758cd58 100644 --- a/configure.ac +++ b/configure.ac @@ -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.])