From 99198dfdc64aeda647d5e57166f42857bbd4163b Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 6 Jan 2004 15:07:46 +0000 Subject: Clean up configure logic for enabling "nonportable" atomics: don't export the result via apr.h, and enable use of inline asm by default on ppc64 and x86_64. * configure.in: Define USE_GENERIC_ATOMICS on i[456]86 unless --enable-nonportable-atomics was used. * include/apr.h.in: Remove APR_FORCE_GENERIC_ATOMICS. * atomic/unix/apr_atomic.c: Check for !defined(USE_GENERIC_ATOMICS) rather than defined(APR_FORCE_GENERIC_ATOMICS). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64861 13f79535-47bb-0310-9956-ffa450edef68 --- atomic/unix/apr_atomic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'atomic') diff --git a/atomic/unix/apr_atomic.c b/atomic/unix/apr_atomic.c index feaeee11c..8b4296cdf 100644 --- a/atomic/unix/apr_atomic.c +++ b/atomic/unix/apr_atomic.c @@ -56,10 +56,12 @@ #include "apr_atomic.h" #include "apr_thread_mutex.h" +#include "apr_private.h" + #include #if (defined(__i386__) || defined(__x86_64__)) \ - && defined(__GNUC__) && !APR_FORCE_ATOMIC_GENERIC + && defined(__GNUC__) && !defined(USE_GENERIC_ATOMICS) APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with, @@ -142,7 +144,9 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint #endif /* (__linux__ || __EMX__ || __FreeBSD__) && __i386__ */ -#if (defined(__PPC__) || defined(__ppc__)) && defined(__GNUC__) && !APR_FORCE_ATOMIC_GENERIC +#if (defined(__PPC__) || defined(__ppc__)) && defined(__GNUC__) \ + && !defined(USE_GENERIC_ATOMICS) + APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap, apr_uint32_t cmp) -- cgit v1.2.1