Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18327
b: refs/heads/master
c: b11fa58
h: refs/heads/master
i:
  18325: a4aa0a8
  18323: 25376d9
  18319: e6a1e3c
v: v3
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Jan 13, 2006
1 parent 6cf7945 commit 3ee1f32
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 144b9c135b963bcb7f242c7b83bff930620d3161
refs/heads/master: b11fa580ac06b34944a2b46a44ebce2c284e1a76
26 changes: 13 additions & 13 deletions trunk/include/asm-powerpc/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3ee1f32

Please sign in to comment.