From: Ivan Maidanski Date: Wed, 3 Aug 2011 16:32:38 +0000 (+0400) Subject: generic_pthread.h (AO_or_full): rename incr parameter to value; remove tmp local... X-Git-Tag: libatomic_ops-7_3alpha2~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f983b636c6ec8055c4806551fd4e117e3033757;p=libatomic_ops generic_pthread.h (AO_or_full): rename incr parameter to value; remove tmp local variable --- diff --git a/src/atomic_ops/sysdeps/generic_pthread.h b/src/atomic_ops/sysdeps/generic_pthread.h index 55a1967..789218d 100644 --- a/src/atomic_ops/sysdeps/generic_pthread.h +++ b/src/atomic_ops/sysdeps/generic_pthread.h @@ -191,13 +191,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) { - AO_t tmp; - pthread_mutex_lock(&AO_pt_lock); - tmp = *p; - *p = (tmp | incr); + *p |= value; pthread_mutex_unlock(&AO_pt_lock); } #define AO_HAVE_or_full