diff options
Diffstat (limited to '')
-rw-r--r-- | atomic/unix/builtins.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/atomic/unix/builtins.c b/atomic/unix/builtins.c index 22b828c..5165e72 100644 --- a/atomic/unix/builtins.c +++ b/atomic/unix/builtins.c @@ -18,15 +18,20 @@ #ifdef USE_ATOMICS_BUILTINS -#if defined(__arm__) || defined(__powerpc__) || defined(__powerpc64__) -#define WEAK_MEMORY_ORDERING 1 -#else +#if defined(__i386__) || defined(__x86_64__) \ + || defined(__s390__) || defined(__s390x__) #define WEAK_MEMORY_ORDERING 0 +#else +#define WEAK_MEMORY_ORDERING 1 #endif APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p) { +#if defined (USE_ATOMICS_GENERIC64) + return apr__atomic_generic64_init(p); +#else return APR_SUCCESS; +#endif } APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem) @@ -114,7 +119,7 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint APR_DECLARE(void*) apr_atomic_casptr(volatile void **mem, void *ptr, const void *cmp) { #if HAVE__ATOMIC_BUILTINS - __atomic_compare_exchange_n(mem, (void **)&cmp, ptr, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); + __atomic_compare_exchange_n(mem, (void *)&cmp, ptr, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); return (void *)cmp; #else return (void *)__sync_val_compare_and_swap(mem, (void *)cmp, ptr); |