summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-12-08 16:39:56 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-12-08 16:39:56 +0400
commita6d9efc45938225665f7708f98a81fb6a7724f0f (patch)
tree226daa2a700b586980ef400db31c5178489d70bc /configure.ac
parent9a9c43a0ff7f36c4326f696efc31579dd141156d (diff)
downloadlibatomic_ops-a6d9efc45938225665f7708f98a81fb6a7724f0f.tar.gz
Add new macro (AO_PREFER_GENERALIZED) to favor generalized primitives
over direct assembly-based ones * configure.ac (AO_PREFER_GENERALIZED): New AC template. * src/atomic_ops/sysdeps/armcc/arm_v6.h (AO_test_and_set, AO_HAVE_test_and_set, AO_fetch_and_add, AO_HAVE_fetch_and_add, AO_fetch_and_add1, AO_HAVE_fetch_and_add1, AO_fetch_and_sub1, AO_HAVE_fetch_and_sub1): Do not define if AO_PREFER_GENERALIZED. * src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set, AO_HAVE_test_and_set, AO_fetch_and_add, AO_HAVE_fetch_and_add, AO_fetch_and_add1, AO_HAVE_fetch_and_add1, AO_fetch_and_sub1, AO_HAVE_fetch_and_sub1): Likewise. * src/atomic_ops/sysdeps/gcc/avr32.h (AO_test_and_set_full, AO_HAVE_test_and_set_full): Likewise. * src/atomic_ops/sysdeps/gcc/hexagon.h (AO_fetch_and_add, AO_HAVE_fetch_and_add, AO_test_and_set, AO_HAVE_test_and_set): Likewise. * src/atomic_ops/sysdeps/gcc/ia64.h (AO_fetch_and_add1_acquire, AO_HAVE_fetch_and_add1_acquire, AO_fetch_and_add1_release, AO_HAVE_fetch_and_add1_release, AO_fetch_and_sub1_acquire, AO_HAVE_fetch_and_sub1_acquire, AO_fetch_and_sub1_release, AO_HAVE_fetch_and_sub1_release, AO_int_fetch_and_add1_acquire, AO_HAVE_int_fetch_and_add1_acquire, AO_int_fetch_and_add1_release, AO_HAVE_int_fetch_and_add1_release, AO_int_fetch_and_sub1_acquire, AO_HAVE_int_fetch_and_sub1_acquire, AO_int_fetch_and_sub1_release, AO_HAVE_int_fetch_and_sub1_release): Likewise. * src/atomic_ops/sysdeps/gcc/powerpc.h (AO_test_and_set, AO_HAVE_test_and_set, AO_test_and_set_acquire, AO_HAVE_test_and_set_acquire, AO_test_and_set_release, AO_HAVE_test_and_set_release, AO_test_and_set_full, AO_HAVE_test_and_set_full): Likewise. * src/atomic_ops/sysdeps/gcc/x86.h (AO_fetch_and_add_full, AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full, AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise. * src/atomic_ops/sysdeps/gcc/x86_64.h (AO_fetch_and_add_full, AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full, AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise. * src/atomic_ops/sysdeps/hpc/ia64.h (AO_fetch_and_add1_acquire, AO_HAVE_fetch_and_add1_acquire, AO_fetch_and_add1_release, AO_HAVE_fetch_and_add1_release, AO_fetch_and_sub1_acquire, AO_HAVE_fetch_and_sub1_acquire, AO_fetch_and_sub1_release, AO_HAVE_fetch_and_sub1_release): Likewise. * src/atomic_ops/sysdeps/ibmc/powerpc.h (AO_test_and_set_acquire, AO_HAVE_test_and_set_acquire, AO_test_and_set_release, AO_HAVE_test_and_set_release, AO_test_and_set_full, AO_HAVE_test_and_set_full): Likewise. * src/atomic_ops/sysdeps/icc/ia64.h (AO_fetch_and_add1_acquire, AO_HAVE_fetch_and_add1_acquire, AO_fetch_and_add1_release, AO_HAVE_fetch_and_add1_release, AO_fetch_and_sub1_acquire, AO_HAVE_fetch_and_sub1_acquire, AO_fetch_and_sub1_release, AO_HAVE_fetch_and_sub1_release): Likewise. * src/atomic_ops/sysdeps/msftc/x86_64.h (AO_fetch_and_add_full, AO_HAVE_fetch_and_add_full, AO_fetch_and_add1_full, AO_HAVE_fetch_and_add1_full, AO_fetch_and_sub1_full, AO_HAVE_fetch_and_sub1_full): Likewise. * src/atomic_ops/sysdeps/sunc/x86.h (AO_fetch_and_add_full, AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full, AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise. * src/atomic_ops/sysdeps/sunc/x86_64.h (AO_fetch_and_add_full, AO_HAVE_fetch_and_add_full, AO_and_full, AO_HAVE_and_full, AO_or_full, AO_HAVE_or_full, AO_xor_full, AO_HAVE_xor_full): Likewise. * src/atomic_ops/sysdeps/gcc/arm.h (AO_test_and_set_full, AO_HAVE_test_and_set_full): Do not define if AO_PREFER_GENERALIZED (but only in case of ARMv6+). * src/atomic_ops/sysdeps/msftc/common32_defs.h (_InterlockedIncrement, _InterlockedDecrement, _InterlockedExchangeAdd): Do not declare intrinsic if both AO_PREFER_GENERALIZED and AO_ASSUME_WINDOWS98. * src/atomic_ops/sysdeps/msftc/common32_defs.h (AO_fetch_and_add_full, AO_HAVE_fetch_and_add_full, AO_fetch_and_add1_full, AO_HAVE_fetch_and_add1_full, AO_fetch_and_sub1_full, AO_HAVE_fetch_and_sub1_full): Do not define if both AO_PREFER_GENERALIZED and AO_ASSUME_WINDOWS98. * src/atomic_ops/sysdeps/msftc/x86_64.h (_InterlockedIncrement64, _InterlockedDecrement64, _InterlockedExchangeAdd64): Do not declare intrinsic if AO_PREFER_GENERALIZED.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4427849..763ec56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,8 @@ AH_TEMPLATE([AO_TRACE_MALLOC], [Trace AO_malloc/free calls (for debug only)])
# These macros are tested in public headers
AH_TEMPLATE([AO_GENERALIZE_ASM_BOOL_CAS],
[Force compare_and_swap definition via fetch_compare_and_swap])
+AH_TEMPLATE([AO_PREFER_GENERALIZED],
+ [Prefer generalized definitions to direct assembly-based ones])
AH_TEMPLATE([AO_USE_PTHREAD_DEFS],
[Emulate atomic operations via slow and async-signal-unsafe \
pthread locking])