diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 09:08:05 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 09:08:18 -0400 |
commit | e060c38434b2caa78efe7cedaff4191040b65a15 (patch) | |
tree | 407361230bf6733f63d8e788e4b5e6566ee04818 /arch/blackfin/include/asm/atomic.h | |
parent | 10e4ac572eeffe5317019bd7330b6058a400dfc2 (diff) | |
parent | cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 (diff) |
Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
Diffstat (limited to 'arch/blackfin/include/asm/atomic.h')
-rw-r--r-- | arch/blackfin/include/asm/atomic.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/blackfin/include/asm/atomic.h b/arch/blackfin/include/asm/atomic.h index 4c707dbe1ff..135225696fd 100644 --- a/arch/blackfin/include/asm/atomic.h +++ b/arch/blackfin/include/asm/atomic.h | |||
@@ -89,15 +89,14 @@ static inline void atomic_set_mask(int mask, atomic_t *v) | |||
89 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | 89 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) |
90 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 90 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
91 | 91 | ||
92 | #define atomic_add_unless(v, a, u) \ | 92 | #define __atomic_add_unless(v, a, u) \ |
93 | ({ \ | 93 | ({ \ |
94 | int c, old; \ | 94 | int c, old; \ |
95 | c = atomic_read(v); \ | 95 | c = atomic_read(v); \ |
96 | while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ | 96 | while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ |
97 | c = old; \ | 97 | c = old; \ |
98 | c != (u); \ | 98 | c; \ |
99 | }) | 99 | }) |
100 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
101 | 100 | ||
102 | /* | 101 | /* |
103 | * atomic_inc_and_test - increment and test | 102 | * atomic_inc_and_test - increment and test |
@@ -112,10 +111,7 @@ static inline void atomic_set_mask(int mask, atomic_t *v) | |||
112 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) | 111 | #define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) |
113 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 112 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) |
114 | 113 | ||
115 | #include <asm-generic/atomic-long.h> | ||
116 | 114 | ||
117 | #endif | 115 | #endif |
118 | 116 | ||
119 | #include <asm-generic/atomic64.h> | ||
120 | |||
121 | #endif | 117 | #endif |