diff options
author | Anton Blanchard <anton@samba.org> | 2006-01-13 16:51:52 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 21:18:54 +1100 |
commit | b11fa580ac06b34944a2b46a44ebce2c284e1a76 (patch) | |
tree | 128c569facfb43b1e3eccbb0ead907c52358a13e /include/asm-powerpc/atomic.h | |
parent | 144b9c135b963bcb7f242c7b83bff930620d3161 (diff) | |
download | blackbird-obmc-linux-b11fa580ac06b34944a2b46a44ebce2c284e1a76.tar.gz blackbird-obmc-linux-b11fa580ac06b34944a2b46a44ebce2c284e1a76.zip |
[PATCH] powerpc: reformat atomic_add_unless
It makes my eyes hurt.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/atomic.h')
-rw-r--r-- | include/asm-powerpc/atomic.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index 9ce51ba54c13..147a38dcc766 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h @@ -176,19 +176,19 @@ static __inline__ int atomic_dec_return(atomic_t *v) * Atomically adds @a to @v, so long as it was not @u. * Returns non-zero if @v was not @u, and zero otherwise. */ -#define atomic_add_unless(v, a, u) \ -({ \ - int c, old; \ - c = atomic_read(v); \ - for (;;) { \ - if (unlikely(c == (u))) \ - break; \ - old = atomic_cmpxchg((v), c, c + (a)); \ - if (likely(old == c)) \ - break; \ - c = old; \ - } \ - c != (u); \ +#define atomic_add_unless(v, a, u) \ +({ \ + int c, old; \ + c = atomic_read(v); \ + for (;;) { \ + if (unlikely(c == (u))) \ + break; \ + old = atomic_cmpxchg((v), c, c + (a)); \ + if (likely(old == c)) \ + break; \ + c = old; \ + } \ + c != (u); \ }) #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |