mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
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>
This commit is contained in:
parent
e5931943d0
commit
c2f21ce2e3
8 changed files with 297 additions and 135 deletions
|
@ -43,13 +43,13 @@ static inline void mutex_clear_owner(struct mutex *lock)
|
|||
\
|
||||
DEBUG_LOCKS_WARN_ON(in_interrupt()); \
|
||||
local_irq_save(flags); \
|
||||
arch_spin_lock(&(lock)->raw_lock); \
|
||||
arch_spin_lock(&(lock)->rlock.raw_lock);\
|
||||
DEBUG_LOCKS_WARN_ON(l->magic != l); \
|
||||
} while (0)
|
||||
|
||||
#define spin_unlock_mutex(lock, flags) \
|
||||
do { \
|
||||
arch_spin_unlock(&(lock)->raw_lock); \
|
||||
local_irq_restore(flags); \
|
||||
preempt_check_resched(); \
|
||||
#define spin_unlock_mutex(lock, flags) \
|
||||
do { \
|
||||
arch_spin_unlock(&(lock)->rlock.raw_lock); \
|
||||
local_irq_restore(flags); \
|
||||
preempt_check_resched(); \
|
||||
} while (0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue