From: Ivan Maidanski Date: Wed, 3 Aug 2011 17:26:44 +0000 (+0400) Subject: * src/atomic_ops/generalize.h (AO_or_full): Rename incr argument to value. X-Git-Tag: libatomic_ops-7_3alpha2~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dabe1f0840c454f43487540d09dba584685c815b;p=libatomic_ops * src/atomic_ops/generalize.h (AO_or_full): Rename incr argument to value. * src/atomic_ops/sysdeps/gcc/x86.h: Ditto. * src/atomic_ops/sysdeps/gcc/x86_64.h: Ditto. * src/atomic_ops/sysdeps/sunc/x86.h: Ditto. * src/atomic_ops/sysdeps/sunc/x86_64.h: Ditto. --- diff --git a/src/atomic_ops/generalize.h b/src/atomic_ops/generalize.h index d6c8e93..7a5d7a0 100644 --- a/src/atomic_ops/generalize.h +++ b/src/atomic_ops/generalize.h @@ -713,14 +713,14 @@ /* Atomic or */ #if defined(AO_HAVE_compare_and_swap_full) && !defined(AO_HAVE_or_full) AO_INLINE void - AO_or_full(volatile AO_t *addr, AO_t incr) + AO_or_full(volatile AO_t *addr, AO_t value) { AO_t old; do { old = *addr; } - while (!AO_compare_and_swap_full(addr, old, old | incr)); + while (!AO_compare_and_swap_full(addr, old, old | value)); } # define AO_HAVE_or_full #endif diff --git a/src/atomic_ops/sysdeps/gcc/x86.h b/src/atomic_ops/sysdeps/gcc/x86.h index 807afc1..5ce9d13 100644 --- a/src/atomic_ops/sysdeps/gcc/x86.h +++ b/src/atomic_ops/sysdeps/gcc/x86.h @@ -94,10 +94,10 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr) /* Really only works for 486 and later */ AO_INLINE void -AO_or_full (volatile AO_t *p, AO_t incr) +AO_or_full (volatile AO_t *p, AO_t value) { __asm__ __volatile__ ("lock; orl %1, %0" : - "=m" (*p) : "r" (incr), "m" (*p) : "memory"); + "=m" (*p) : "r" (value), "m" (*p) : "memory"); } #define AO_HAVE_or_full diff --git a/src/atomic_ops/sysdeps/gcc/x86_64.h b/src/atomic_ops/sysdeps/gcc/x86_64.h index 3cbe76e..afb31e8 100644 --- a/src/atomic_ops/sysdeps/gcc/x86_64.h +++ b/src/atomic_ops/sysdeps/gcc/x86_64.h @@ -91,10 +91,10 @@ AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr) #define AO_HAVE_int_fetch_and_add_full AO_INLINE void -AO_or_full (volatile AO_t *p, AO_t incr) +AO_or_full (volatile AO_t *p, AO_t value) { __asm__ __volatile__ ("lock; orq %1, %0" : - "=m" (*p) : "r" (incr), "m" (*p) : "memory"); + "=m" (*p) : "r" (value), "m" (*p) : "memory"); } #define AO_HAVE_or_full diff --git a/src/atomic_ops/sysdeps/sunc/x86.h b/src/atomic_ops/sysdeps/sunc/x86.h index ab34db9..4090c2e 100644 --- a/src/atomic_ops/sysdeps/sunc/x86.h +++ b/src/atomic_ops/sysdeps/sunc/x86.h @@ -91,10 +91,10 @@ AO_short_fetch_and_add_full (volatile unsigned short *p, unsigned short incr) /* Really only works for 486 and later */ AO_INLINE void -AO_or_full (volatile AO_t *p, AO_t incr) +AO_or_full (volatile AO_t *p, AO_t value) { __asm__ __volatile__ ("lock; orl %1, %0" : - "=m" (*p) : "r" (incr) /* , "m" (*p) */ + "=m" (*p) : "r" (value) /* , "m" (*p) */ : "memory"); } #define AO_HAVE_or_full diff --git a/src/atomic_ops/sysdeps/sunc/x86_64.h b/src/atomic_ops/sysdeps/sunc/x86_64.h index b07169e..50fbb4b 100644 --- a/src/atomic_ops/sysdeps/sunc/x86_64.h +++ b/src/atomic_ops/sysdeps/sunc/x86_64.h @@ -91,10 +91,10 @@ AO_int_fetch_and_add_full (volatile unsigned int *p, unsigned int incr) #define AO_HAVE_int_fetch_and_add_full AO_INLINE void -AO_or_full (volatile AO_t *p, AO_t incr) +AO_or_full (volatile AO_t *p, AO_t value) { __asm__ __volatile__ ("lock; orq %1, %0" : - "=m" (*p) : "r" (incr) /* , "m" (*p) */ + "=m" (*p) : "r" (value) /* , "m" (*p) */ : "memory"); } #define AO_HAVE_or_full