aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/asm/atomic.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sh/include/asm/atomic.h b/arch/sh/include/asm/atomic.h
index 8ddb2635cf92..2177596d4b38 100644
--- a/arch/sh/include/asm/atomic.h
+++ b/arch/sh/include/asm/atomic.h
@@ -38,15 +38,15 @@
38#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) 38#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n)))
39 39
40/** 40/**
41 * atomic_add_unless - add unless the number is a given value 41 * __atomic_add_unless - add unless the number is a given value
42 * @v: pointer of type atomic_t 42 * @v: pointer of type atomic_t
43 * @a: the amount to add to v... 43 * @a: the amount to add to v...
44 * @u: ...unless v is equal to u. 44 * @u: ...unless v is equal to u.
45 * 45 *
46 * Atomically adds @a to @v, so long as it was not @u. 46 * Atomically adds @a to @v, so long as it was not @u.
47 * Returns non-zero if @v was not @u, and zero otherwise. 47 * Returns the old value of @v.
48 */ 48 */
49static inline int atomic_add_unless(atomic_t *v, int a, int u) 49static inline int __atomic_add_unless(atomic_t *v, int a, int u)
50{ 50{
51 int c, old; 51 int c, old;
52 c = atomic_read(v); 52 c = atomic_read(v);
@@ -59,7 +59,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
59 c = old; 59 c = old;
60 } 60 }
61 61
62 return c != (u); 62 return c;
63} 63}
64 64
65#define smp_mb__before_atomic_dec() smp_mb() 65#define smp_mb__before_atomic_dec() smp_mb()