X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fspinlock_types.h;h=68d88f71f1a2049c2f8be89c47aab85978f21054;hb=a993b542bb4cd3e5a64863b7ef892bbebec2239b;hp=dc5fb69e4de9333ec84fef3f28c9a5bbbbab649d;hpb=f7d57e42e7ebd085133506ef6325e70e822196dc;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/spinlock_types.h b/include/linux/spinlock_types.h index dc5fb69e4de..68d88f71f1a 100644 --- a/include/linux/spinlock_types.h +++ b/include/linux/spinlock_types.h @@ -9,17 +9,17 @@ * Released under the General Public License (GPL). */ -#include - #if defined(CONFIG_SMP) # include #else # include #endif +#include + typedef struct { raw_spinlock_t raw_lock; -#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) +#ifdef CONFIG_GENERIC_LOCKBREAK unsigned int break_lock; #endif #ifdef CONFIG_DEBUG_SPINLOCK @@ -35,7 +35,7 @@ typedef struct { typedef struct { raw_rwlock_t raw_lock; -#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP) +#ifdef CONFIG_GENERIC_LOCKBREAK unsigned int break_lock; #endif #ifdef CONFIG_DEBUG_SPINLOCK @@ -85,6 +85,12 @@ typedef struct { RW_DEP_MAP_INIT(lockname) } #endif +/* + * SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and + * are hence deprecated. + * Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or + * __SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate. + */ #define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init) #define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init)