diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-02 14:02:59 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-12-14 17:55:32 -0500 |
commit | c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 (patch) | |
tree | 6cc8d1fd37ffa6d02481353857b92734241f4dd0 /kernel/mutex-debug.h | |
parent | e5931943d02bf751b1ec849c0d2ade23d76a8d41 (diff) |
locking: Implement new raw_spinlock
Now that the raw_spin name space is freed up, we can implement
raw_spinlock and the related functions which are used to annotate the
locks which are not converted to sleeping spinlocks in preempt-rt.
A side effect is that only such locks can be used with the low level
lock fsunctions which circumvent lockdep.
For !rt spin_* functions are mapped to the raw_spin* implementations.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/mutex-debug.h')
-rw-r--r-- | kernel/mutex-debug.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/mutex-debug.h b/kernel/mutex-debug.h index 7bebbd15b342..57d527a16f9d 100644 --- a/kernel/mutex-debug.h +++ b/kernel/mutex-debug.h | |||
@@ -43,13 +43,13 @@ static inline void mutex_clear_owner(struct mutex *lock) | |||
43 | \ | 43 | \ |
44 | DEBUG_LOCKS_WARN_ON(in_interrupt()); \ | 44 | DEBUG_LOCKS_WARN_ON(in_interrupt()); \ |
45 | local_irq_save(flags); \ | 45 | local_irq_save(flags); \ |
46 | arch_spin_lock(&(lock)->raw_lock); \ | 46 | arch_spin_lock(&(lock)->rlock.raw_lock);\ |
47 | DEBUG_LOCKS_WARN_ON(l->magic != l); \ | 47 | DEBUG_LOCKS_WARN_ON(l->magic != l); \ |
48 | } while (0) | 48 | } while (0) |
49 | 49 | ||
50 | #define spin_unlock_mutex(lock, flags) \ | 50 | #define spin_unlock_mutex(lock, flags) \ |
51 | do { \ | 51 | do { \ |
52 | arch_spin_unlock(&(lock)->raw_lock); \ | 52 | arch_spin_unlock(&(lock)->rlock.raw_lock); \ |
53 | local_irq_restore(flags); \ | 53 | local_irq_restore(flags); \ |
54 | preempt_check_resched(); \ | 54 | preempt_check_resched(); \ |
55 | } while (0) | 55 | } while (0) |