Messages in this thread Patch in this message | | | Date | Mon, 10 Aug 2009 10:15:08 +0200 | From | Heiko Carstens <> | Subject | [Patch/RFC 2/4] spinlock: move include statements |
| |
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Move include statements in order to avoid forward declarations if the spinlock code gets inlined.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> --- include/linux/spinlock.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
Index: linux-2.6/include/linux/spinlock.h =================================================================== --- linux-2.6.orig/include/linux/spinlock.h +++ linux-2.6/include/linux/spinlock.h @@ -143,15 +143,6 @@ static inline void smp_mb__after_lock(vo */ #define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock) -/* - * Pull the _spin_*()/_read_*()/_write_*() functions/declarations: - */ -#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) -# include <linux/spinlock_api_smp.h> -#else -# include <linux/spinlock_api_up.h> -#endif - #ifdef CONFIG_DEBUG_SPINLOCK extern void _raw_spin_lock(spinlock_t *lock); #define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock) @@ -380,4 +371,13 @@ extern int _atomic_dec_and_lock(atomic_t */ #define spin_can_lock(lock) (!spin_is_locked(lock)) +/* + * Pull the _spin_*()/_read_*()/_write_*() functions/declarations: + */ +#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) +# include <linux/spinlock_api_smp.h> +#else +# include <linux/spinlock_api_up.h> +#endif + #endif /* __LINUX_SPINLOCK_H */
| |