Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54788
b: refs/heads/master
c: e656e24
h: refs/heads/master
v: v3
  • Loading branch information
Mathieu Desnoyers authored and Linus Torvalds committed May 8, 2007
1 parent c27cff2 commit 6a8d24e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: bb2382c3e4395ab595278cc7b92ac3f2eaf23f66
refs/heads/master: e656e245d5adf19f3c431e7f7792659c204e32f2
6 changes: 3 additions & 3 deletions trunk/include/asm-i386/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
return atomic_add_return(-i,v);
}

#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
#define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new)))
#define atomic_xchg(v, new) (xchg(&((v)->counter), (new)))

/**
* atomic_add_unless - add unless the number is already a given value
Expand All @@ -221,7 +221,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
*/
#define atomic_add_unless(v, a, u) \
({ \
int c, old; \
__typeof__((v)->counter) c, old; \
c = atomic_read(v); \
for (;;) { \
if (unlikely(c == (u))) \
Expand Down

0 comments on commit 6a8d24e

Please sign in to comment.