diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/atomic.h | 6 | ||||
-rw-r--r-- | include/asm-generic/cmpxchg.h | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 1ced6413ea03..33bd2de3bc1e 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -136,12 +136,6 @@ static inline void atomic_dec(atomic_t *v) | |||
136 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | 136 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |
137 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 137 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) |
138 | 138 | ||
139 | #define cmpxchg_local(ptr, o, n) \ | ||
140 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
141 | (unsigned long)(n), sizeof(*(ptr)))) | ||
142 | |||
143 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
144 | |||
145 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) | 139 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
146 | { | 140 | { |
147 | int c, old; | 141 | int c, old; |
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h index 14883026015d..811fb1e9b061 100644 --- a/include/asm-generic/cmpxchg.h +++ b/include/asm-generic/cmpxchg.h | |||
@@ -92,6 +92,16 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | |||
92 | */ | 92 | */ |
93 | #include <asm-generic/cmpxchg-local.h> | 93 | #include <asm-generic/cmpxchg-local.h> |
94 | 94 | ||
95 | #ifndef cmpxchg_local | ||
96 | #define cmpxchg_local(ptr, o, n) \ | ||
97 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
98 | (unsigned long)(n), sizeof(*(ptr)))) | ||
99 | #endif | ||
100 | |||
101 | #ifndef cmpxchg64_local | ||
102 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
103 | #endif | ||
104 | |||
95 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) | 105 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) |
96 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) | 106 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) |
97 | 107 | ||