Release 4.7 include/linux/spinlock_api_smp.h
#ifndef __LINUX_SPINLOCK_API_SMP_H
#define __LINUX_SPINLOCK_API_SMP_H
#ifndef __LINUX_SPINLOCK_H
# error "please don't include this file directly"
#endif
/*
* include/linux/spinlock_api_smp.h
*
* spinlock API declarations on SMP (and debug)
* (implemented in kernel/spinlock.c)
*
* portions Copyright 2005, Red Hat, Inc., Ingo Molnar
* Released under the General Public License (GPL).
*/
int in_lock_functions(unsigned long addr);
#define assert_raw_spin_locked(x) BUG_ON(!raw_spin_is_locked(x))
void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) __acquires(lock);
void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)
__acquires
(lock);
void __lockfunc _raw_spin_lock_bh_nested(raw_spinlock_t *lock, int subclass)
__acquires
(lock);
void __lockfunc
_raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map)
__acquires
(lock);
void __lockfunc _raw_spin_lock_bh(raw_spinlock_t *lock) __acquires(lock);
void __lockfunc _raw_spin_lock_irq(raw_spinlock_t *lock)
__acquires
(lock);
unsigned long __lockfunc _raw_spin_lock_irqsave(raw_spinlock_t *lock)
__acquires
(lock);
unsigned long __lockfunc
_raw_spin_lock_irqsave_nested(raw_spinlock_t *lock, int subclass)
__acquires
(lock);
int __lockfunc _raw_spin_trylock(raw_spinlock_t *lock);
int __lockfunc _raw_spin_trylock_bh(raw_spinlock_t *lock);
void __lockfunc _raw_spin_unlock(raw_spinlock_t *lock) __releases(lock);
void __lockfunc _raw_spin_unlock_bh(raw_spinlock_t *lock) __releases(lock);
void __lockfunc _raw_spin_unlock_irq(raw_spinlock_t *lock) __releases(lock);
void __lockfunc
_raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags)
__releases
(lock);
#ifdef CONFIG_INLINE_SPIN_LOCK
#define _raw_spin_lock(lock) __raw_spin_lock(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_LOCK_BH
#define _raw_spin_lock_bh(lock) __raw_spin_lock_bh(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_LOCK_IRQ
#define _raw_spin_lock_irq(lock) __raw_spin_lock_irq(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_LOCK_IRQSAVE
#define _raw_spin_lock_irqsave(lock) __raw_spin_lock_irqsave(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_TRYLOCK
#define _raw_spin_trylock(lock) __raw_spin_trylock(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_TRYLOCK_BH
#define _raw_spin_trylock_bh(lock) __raw_spin_trylock_bh(lock)
#endif
#ifndef CONFIG_UNINLINE_SPIN_UNLOCK
#define _raw_spin_unlock(lock) __raw_spin_unlock(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_UNLOCK_BH
#define _raw_spin_unlock_bh(lock) __raw_spin_unlock_bh(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_UNLOCK_IRQ
#define _raw_spin_unlock_irq(lock) __raw_spin_unlock_irq(lock)
#endif
#ifdef CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE
#define _raw_spin_unlock_irqrestore(lock, flags) __raw_spin_unlock_irqrestore(lock, flags)
#endif
static inline int __raw_spin_trylock(raw_spinlock_t *lock)
{
preempt_disable();
if (do_raw_spin_trylock(lock)) {
spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
return 1;
}
preempt_enable();
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
thomas gleixner | thomas gleixner | 23 | 50.00% | 4 | 80.00% |
heiko carstens | heiko carstens | 23 | 50.00% | 1 | 20.00% |
| Total | 46 | 100.00% | 5 | 100.00% |
/*
* If lockdep is enabled then we use the non-preemption spin-ops
* even on CONFIG_PREEMPT, because lockdep assumes that interrupts are
* not re-enabled during lock-acquire (which the preempt-spin-ops do):
*/
#if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)
static inline unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock)
{
unsigned long flags;
local_irq_save(flags);
preempt_disable();
spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
/*
* On lockdep we dont want the hand-coded irq-enable of
* do_raw_spin_lock_flags() code, because lockdep assumes
* that interrupts are not re-enabled during lock-acquire:
*/
#ifdef CONFIG_LOCKDEP
LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
#else
do_raw_spin_lock_flags(lock, &flags);
#endif
return flags;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
thomas gleixner | thomas gleixner | 39 | 59.09% | 4 | 80.00% |
heiko carstens | heiko carstens | 27 | 40.91% | 1 | 20.00% |
| Total | 66 | 100.00% | 5 | 100.00% |
static inline void __raw_spin_lock_irq(raw_spinlock_t *lock)
{
local_irq_disable();
preempt_disable();
spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 27 | 67.50% | 1 | 20.00% |
thomas gleixner | thomas gleixner | 13 | 32.50% | 4 | 80.00% |
| Total | 40 | 100.00% | 5 | 100.00% |
static inline void __raw_spin_lock_bh(raw_spinlock_t *lock)
{
__local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 23 | 56.10% | 1 | 16.67% |
thomas gleixner | thomas gleixner | 12 | 29.27% | 4 | 66.67% |
peter zijlstra | peter zijlstra | 6 | 14.63% | 1 | 16.67% |
| Total | 41 | 100.00% | 6 | 100.00% |
static inline void __raw_spin_lock(raw_spinlock_t *lock)
{
preempt_disable();
spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 23 | 62.16% | 1 | 20.00% |
thomas gleixner | thomas gleixner | 14 | 37.84% | 4 | 80.00% |
| Total | 37 | 100.00% | 5 | 100.00% |
#endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */
static inline void __raw_spin_unlock(raw_spinlock_t *lock)
{
spin_release(&lock->dep_map, 1, _RET_IP_);
do_raw_spin_unlock(lock);
preempt_enable();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 26 | 83.87% | 1 | 20.00% |
thomas gleixner | thomas gleixner | 5 | 16.13% | 4 | 80.00% |
| Total | 31 | 100.00% | 5 | 100.00% |
static inline void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock,
unsigned long flags)
{
spin_release(&lock->dep_map, 1, _RET_IP_);
do_raw_spin_unlock(lock);
local_irq_restore(flags);
preempt_enable();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 36 | 90.00% | 1 | 20.00% |
thomas gleixner | thomas gleixner | 4 | 10.00% | 4 | 80.00% |
| Total | 40 | 100.00% | 5 | 100.00% |
static inline void __raw_spin_unlock_irq(raw_spinlock_t *lock)
{
spin_release(&lock->dep_map, 1, _RET_IP_);
do_raw_spin_unlock(lock);
local_irq_enable();
preempt_enable();
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 30 | 88.24% | 1 | 20.00% |
thomas gleixner | thomas gleixner | 4 | 11.76% | 4 | 80.00% |
| Total | 34 | 100.00% | 5 | 100.00% |
static inline void __raw_spin_unlock_bh(raw_spinlock_t *lock)
{
spin_release(&lock->dep_map, 1, _RET_IP_);
do_raw_spin_unlock(lock);
__local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 27 | 77.14% | 1 | 16.67% |
peter zijlstra | peter zijlstra | 4 | 11.43% | 1 | 16.67% |
thomas gleixner | thomas gleixner | 4 | 11.43% | 4 | 66.67% |
| Total | 35 | 100.00% | 6 | 100.00% |
static inline int __raw_spin_trylock_bh(raw_spinlock_t *lock)
{
__local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
if (do_raw_spin_trylock(lock)) {
spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
return 1;
}
__local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 41 | 75.93% | 1 | 20.00% |
peter zijlstra | peter zijlstra | 10 | 18.52% | 1 | 20.00% |
thomas gleixner | thomas gleixner | 3 | 5.56% | 3 | 60.00% |
| Total | 54 | 100.00% | 5 | 100.00% |
#include <linux/rwlock_api_smp.h>
#endif /* __LINUX_SPINLOCK_API_SMP_H */
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
heiko carstens | heiko carstens | 373 | 47.10% | 2 | 12.50% |
thomas gleixner | thomas gleixner | 196 | 24.75% | 5 | 31.25% |
ingo molnar | ingo molnar | 146 | 18.43% | 2 | 12.50% |
peter zijlstra | peter zijlstra | 36 | 4.55% | 2 | 12.50% |
thomas graf | thomas graf | 16 | 2.02% | 1 | 6.25% |
arjan van de ven | arjan van de ven | 12 | 1.52% | 1 | 6.25% |
josh triplett | josh triplett | 9 | 1.14% | 1 | 6.25% |
raghavendra k t* (same as raghavendra koushik) | raghavendra k t* (same as raghavendra koushik) | 3 | 0.38% | 1 | 6.25% |
chen gang | chen gang | 1 | 0.13% | 1 | 6.25% |
| Total | 792 | 100.00% | 16 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.