diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-06-12 13:46:25 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-06-12 13:46:37 +0200 |
| commit | 535560d841b2d54f31280e05e9c6ffd19da0c4e7 (patch) | |
| tree | 5320502c072284813f3d3d42412bd73e26130863 /include/linux/atomic.h | |
| parent | f602d0632755be4f7eddfdd6c0af13216790177b (diff) | |
| parent | 3cf2f34e1a3d4d5ff209d087925cf950e52f4805 (diff) | |
| download | lwn-535560d841b2d54f31280e05e9c6ffd19da0c4e7.tar.gz lwn-535560d841b2d54f31280e05e9c6ffd19da0c4e7.zip | |
Merge commit '3cf2f34' into sched/core, to fix build error
Fix this dependency on the locking tree's smp_mb*() API changes:
kernel/sched/idle.c:247:3: error: implicit declaration of function ‘smp_mb__after_atomic’ [-Werror=implicit-function-declaration]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 @@ #define _LINUX_ATOMIC_H #include <asm/atomic.h> +/* + * Provide __deprecated wrappers for the new interface, avoid flag day changes. + * We need the ugly external functions to break header recursion hell. + */ +#ifndef smp_mb__before_atomic_inc +static inline void __deprecated smp_mb__before_atomic_inc(void) +{ + extern void __smp_mb__before_atomic(void); + __smp_mb__before_atomic(); +} +#endif + +#ifndef smp_mb__after_atomic_inc +static inline void __deprecated smp_mb__after_atomic_inc(void) +{ + extern void __smp_mb__after_atomic(void); + __smp_mb__after_atomic(); +} +#endif + +#ifndef smp_mb__before_atomic_dec +static inline void __deprecated smp_mb__before_atomic_dec(void) +{ + extern void __smp_mb__before_atomic(void); + __smp_mb__before_atomic(); +} +#endif + +#ifndef smp_mb__after_atomic_dec +static inline void __deprecated smp_mb__after_atomic_dec(void) +{ + extern void __smp_mb__after_atomic(void); + __smp_mb__after_atomic(); +} +#endif + /** * atomic_add_unless - add unless the number is already a given value * @v: pointer of type atomic_t |
