summaryrefslogtreecommitdiff
path: root/atomic
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2004-01-06 15:07:46 +0000
committerJoe Orton <jorton@apache.org>2004-01-06 15:07:46 +0000
commit99198dfdc64aeda647d5e57166f42857bbd4163b (patch)
treeba3070bd6f64e16adefa97b683165d52040778c1 /atomic
parentba7653dd46eac66a054378b82bcb2cc5290149dd (diff)
downloadapr-99198dfdc64aeda647d5e57166f42857bbd4163b.tar.gz
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
Diffstat (limited to 'atomic')
-rw-r--r--atomic/unix/apr_atomic.c8
1 files changed, 6 insertions, 2 deletions
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 <stdlib.h>
#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)