X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-alpha%2Fspinlock.h;h=5e35c5d7aa7f53f1b18ed639812b17af51cdfae6;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=b5f355444fc2466a7ae91adb198b4cacd435f5c6;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h index b5f355444..5e35c5d7a 100644 --- a/include/asm-alpha/spinlock.h +++ b/include/asm-alpha/spinlock.h @@ -23,6 +23,9 @@ typedef struct { struct task_struct * task; const char *base_file; #endif +#ifdef CONFIG_PREEMPT + unsigned int break_lock; +#endif } spinlock_t; #ifdef CONFIG_DEBUG_SPINLOCK @@ -96,12 +99,14 @@ static inline int _raw_spin_trylock(spinlock_t *lock) typedef struct { volatile unsigned int write_lock:1, read_counter:31; +#ifdef CONFIG_PREEMPT + unsigned int break_lock; +#endif } /*__attribute__((aligned(32)))*/ rwlock_t; #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 } #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) -#define rwlock_is_locked(x) (*(volatile int *)(x) != 0) #ifdef CONFIG_DEBUG_RWLOCK extern void _raw_write_lock(rwlock_t * lock);