diff options
Diffstat (limited to 'include/linux/atomic.h')
-rw-r--r-- | include/linux/atomic.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index 5b08a8540ecf..fef3a809e7cf 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h | |||
@@ -3,6 +3,42 @@ | |||
3 | #define _LINUX_ATOMIC_H | 3 | #define _LINUX_ATOMIC_H |
4 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
5 | 5 | ||
6 | /* | ||
7 | * Provide __deprecated wrappers for the new interface, avoid flag day changes. | ||
8 | * We need the ugly external functions to break header recursion hell. | ||
9 | */ | ||
10 | #ifndef smp_mb__before_atomic_inc | ||
11 | static inline void __deprecated smp_mb__before_atomic_inc(void) | ||
12 | { | ||
13 | extern void __smp_mb__before_atomic(void); | ||
14 | __smp_mb__before_atomic(); | ||
15 | } | ||
16 | #endif | ||
17 | |||
18 | #ifndef smp_mb__after_atomic_inc | ||
19 | static inline void __deprecated smp_mb__after_atomic_inc(void) | ||
20 | { | ||
21 | extern void __smp_mb__after_atomic(void); | ||
22 | __smp_mb__after_atomic(); | ||
23 | } | ||
24 | #endif | ||
25 | |||
26 | #ifndef smp_mb__before_atomic_dec | ||
27 | static inline void __deprecated smp_mb__before_atomic_dec(void) | ||
28 | { | ||
29 | extern void __smp_mb__before_atomic(void); | ||
30 | __smp_mb__before_atomic(); | ||
31 | } | ||
32 | #endif | ||
33 | |||
34 | #ifndef smp_mb__after_atomic_dec | ||
35 | static inline void __deprecated smp_mb__after_atomic_dec(void) | ||
36 | { | ||
37 | extern void __smp_mb__after_atomic(void); | ||
38 | __smp_mb__after_atomic(); | ||
39 | } | ||
40 | #endif | ||
41 | |||
6 | /** | 42 | /** |
7 | * atomic_add_unless - add unless the number is already a given value | 43 | * atomic_add_unless - add unless the number is already a given value |
8 | * @v: pointer of type atomic_t | 44 | * @v: pointer of type atomic_t |