git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
include
/
asm-x86_64
/
atomic.h
diff --git
a/include/asm-x86_64/atomic.h
b/include/asm-x86_64/atomic.h
index
cecbf7b
..
4b5cd55
100644
(file)
--- a/
include/asm-x86_64/atomic.h
+++ b/
include/asm-x86_64/atomic.h
@@
-405,14
+405,8
@@
static __inline__ long atomic64_sub_return(long i, atomic64_t *v)
({ \
int c, old; \
c = atomic_read(v); \
({ \
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; \
+ while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \
c = old; \
c = old; \
- } \
c != (u); \
})
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
c != (u); \
})
#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)