19#ifdef USE_ATOMICS_IA32
23#if defined(USE_ATOMICS_GENERIC64)
42 asm volatile (
"lock; xaddl %0,%1"
51 asm volatile (
"lock; subl %1, %0"
66 asm volatile (
"lock; decl %0; setnz %1"
67 :
"=m" (*mem),
"=qm" (prev)
79 asm volatile (
"lock; cmpxchgl %1, %2"
90 asm volatile (
"xchgl %0, %1"
91 :
"=r" (prev),
"+m" (*
mem)
99#if APR_SIZEOF_VOIDP == 4
100 asm volatile (
"lock; cmpxchgl %2, %1"
101 :
"=a" (prev),
"=m" (*
mem)
103#elif APR_SIZEOF_VOIDP == 8
104 asm volatile (
"lock; cmpxchgq %q2, %1"
105 :
"=a" (prev),
"=m" (*
mem)
106 :
"r" ((
unsigned long)
with),
"m" (*mem),
109#error APR_SIZEOF_VOIDP value not supported
117#if APR_SIZEOF_VOIDP == 4
118 asm volatile (
"xchgl %2, %1"
119 :
"=a" (prev),
"+m" (*
mem)
121#elif APR_SIZEOF_VOIDP == 8
122 asm volatile (
"xchgq %q2, %1"
123 :
"=a" (prev),
"+m" (*
mem)
126#error APR_SIZEOF_VOIDP value not supported
apr_status_t apr__atomic_generic64_init(apr_pool_t *p)
apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)
apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
int apr_atomic_dec32(volatile apr_uint32_t *mem)
apr_status_t apr_atomic_init(apr_pool_t *p)
void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap, apr_uint32_t cmp)
apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
apr_uint32_t apr_uint32_t cmp