From: Mathieu Desnoyers Date: Fri, 19 Nov 2010 02:35:41 +0000 (-0500) Subject: Fix missing BITS_PER_LONG -> CAA_BITS_PER_LONG rename X-Git-Tag: v0.5.1~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b39e1761c4ccb070fcda1b86dc4ff0c66a853299;p=userspace-rcu.git Fix missing BITS_PER_LONG -> CAA_BITS_PER_LONG rename Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-qsbr.c b/urcu-qsbr.c index b7c42fd..607e6ae 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -112,13 +112,13 @@ static void update_counter_and_wait(void) int wait_loops = 0; struct rcu_reader *index, *tmp; -#if (BITS_PER_LONG < 64) +#if (CAA_BITS_PER_LONG < 64) /* Switch parity: 0 -> 1, 1 -> 0 */ CAA_STORE_SHARED(rcu_gp_ctr, rcu_gp_ctr ^ RCU_GP_CTR); -#else /* !(BITS_PER_LONG < 64) */ +#else /* !(CAA_BITS_PER_LONG < 64) */ /* Increment current G.P. */ CAA_STORE_SHARED(rcu_gp_ctr, rcu_gp_ctr + RCU_GP_CTR); -#endif /* !(BITS_PER_LONG < 64) */ +#endif /* !(CAA_BITS_PER_LONG < 64) */ /* * Must commit rcu_gp_ctr update to memory before waiting for quiescent @@ -179,7 +179,7 @@ static void update_counter_and_wait(void) * long-size to ensure we do not encounter an overflow bug. */ -#if (BITS_PER_LONG < 64) +#if (CAA_BITS_PER_LONG < 64) void synchronize_rcu(void) { unsigned long was_online; @@ -241,7 +241,7 @@ out: _CAA_STORE_SHARED(rcu_reader.ctr, CAA_LOAD_SHARED(rcu_gp_ctr)); cmm_smp_mb(); } -#else /* !(BITS_PER_LONG < 64) */ +#else /* !(CAA_BITS_PER_LONG < 64) */ void synchronize_rcu(void) { unsigned long was_online; @@ -268,7 +268,7 @@ out: _CAA_STORE_SHARED(rcu_reader.ctr, CAA_LOAD_SHARED(rcu_gp_ctr)); cmm_smp_mb(); } -#endif /* !(BITS_PER_LONG < 64) */ +#endif /* !(CAA_BITS_PER_LONG < 64) */ /* * library wrappers to be used by non-LGPL compatible source code. diff --git a/urcu/uatomic_arch_ppc.h b/urcu/uatomic_arch_ppc.h index 710ce05..426b0f2 100644 --- a/urcu/uatomic_arch_ppc.h +++ b/urcu/uatomic_arch_ppc.h @@ -64,7 +64,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len) return result; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long result; @@ -119,7 +119,7 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old, return old_val; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long old_val; @@ -178,7 +178,7 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val, return result; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long result; diff --git a/urcu/uatomic_arch_s390.h b/urcu/uatomic_arch_s390.h index 75025b1..2a4fa03 100644 --- a/urcu/uatomic_arch_s390.h +++ b/urcu/uatomic_arch_s390.h @@ -84,7 +84,7 @@ unsigned long _uatomic_exchange(volatile void *addr, unsigned long val, int len) : "memory", "cc"); return old_val; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long old_val; @@ -127,7 +127,7 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old, : "memory", "cc"); return old_val; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { __asm__ __volatile__( diff --git a/urcu/uatomic_arch_sparc64.h b/urcu/uatomic_arch_sparc64.h index 399ac12..082c847 100644 --- a/urcu/uatomic_arch_sparc64.h +++ b/urcu/uatomic_arch_sparc64.h @@ -46,7 +46,7 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old, return _new; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { __asm__ __volatile__ ( diff --git a/urcu/uatomic_arch_x86.h b/urcu/uatomic_arch_x86.h index 4e09afd..07b3244 100644 --- a/urcu/uatomic_arch_x86.h +++ b/urcu/uatomic_arch_x86.h @@ -81,7 +81,7 @@ unsigned long __uatomic_cmpxchg(void *addr, unsigned long old, : "memory"); return result; } -#if (BITS_PER_LONG == 64) +#if (CAA_CAA_BITS_PER_LONG == 64) case 8: { unsigned long result = old; @@ -143,7 +143,7 @@ unsigned long __uatomic_exchange(void *addr, unsigned long val, int len) : "memory"); return result; } -#if (BITS_PER_LONG == 64) +#if (CAA_CAA_BITS_PER_LONG == 64) case 8: { unsigned long result; @@ -206,7 +206,7 @@ unsigned long __uatomic_add_return(void *addr, unsigned long val, : "memory"); return result + (unsigned int)val; } -#if (BITS_PER_LONG == 64) +#if (CAA_CAA_BITS_PER_LONG == 64) case 8: { unsigned long result = val; @@ -264,7 +264,7 @@ void __uatomic_add(void *addr, unsigned long val, int len) : "memory"); return; } -#if (BITS_PER_LONG == 64) +#if (CAA_CAA_BITS_PER_LONG == 64) case 8: { __asm__ __volatile__( @@ -319,7 +319,7 @@ void __uatomic_inc(void *addr, int len) : "memory"); return; } -#if (BITS_PER_LONG == 64) +#if (CAA_CAA_BITS_PER_LONG == 64) case 8: { __asm__ __volatile__( @@ -372,7 +372,7 @@ void __uatomic_dec(void *addr, int len) : "memory"); return; } -#if (BITS_PER_LONG == 64) +#if (CAA_CAA_BITS_PER_LONG == 64) case 8: { __asm__ __volatile__( @@ -392,7 +392,7 @@ void __uatomic_dec(void *addr, int len) #define _uatomic_dec(addr) (__uatomic_dec((addr), sizeof(*(addr)))) -#if ((BITS_PER_LONG != 64) && defined(CONFIG_RCU_COMPAT_ARCH)) +#if ((CAA_CAA_BITS_PER_LONG != 64) && defined(CONFIG_RCU_COMPAT_ARCH)) extern int __rcu_cas_avail; extern int __rcu_cas_init(void); diff --git a/urcu/uatomic_generic.h b/urcu/uatomic_generic.h index 6b4ef9e..ced6191 100644 --- a/urcu/uatomic_generic.h +++ b/urcu/uatomic_generic.h @@ -71,7 +71,7 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old, #endif case 4: return __sync_val_compare_and_swap_4(addr, old, _new); -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: return __sync_val_compare_and_swap_8(addr, old, _new); #endif @@ -105,7 +105,7 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val, #endif case 4: return __sync_add_and_fetch_4(addr, val); -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: return __sync_add_and_fetch_8(addr, val); #endif @@ -162,7 +162,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len) return old; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long old; @@ -233,7 +233,7 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val, int len) return old + val; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long old, oldt; @@ -305,7 +305,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len) return old; } -#if (BITS_PER_LONG == 64) +#if (CAA_BITS_PER_LONG == 64) case 8: { unsigned long old, oldt;