]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/linux/spinlock_api_smp.h
[NET]: Prevent transmission after dev_deactivate
[mirror_ubuntu-artful-kernel.git] / include / linux / spinlock_api_smp.h
CommitLineData
fb1c8f93
IM
1#ifndef __LINUX_SPINLOCK_API_SMP_H
2#define __LINUX_SPINLOCK_API_SMP_H
3
4#ifndef __LINUX_SPINLOCK_H
5# error "please don't include this file directly"
6#endif
7
8/*
9 * include/linux/spinlock_api_smp.h
10 *
11 * spinlock API declarations on SMP (and debug)
12 * (implemented in kernel/spinlock.c)
13 *
14 * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
15 * Released under the General Public License (GPL).
16 */
17
18int in_lock_functions(unsigned long addr);
19
20#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x))
21
22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t);
23void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t);
24void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t);
25void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t);
26void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
27void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
28void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t);
29void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
30void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
31unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
32 __acquires(spinlock_t);
33unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
34 __acquires(rwlock_t);
35unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock)
36 __acquires(rwlock_t);
37int __lockfunc _spin_trylock(spinlock_t *lock);
38int __lockfunc _read_trylock(rwlock_t *lock);
39int __lockfunc _write_trylock(rwlock_t *lock);
40int __lockfunc _spin_trylock_bh(spinlock_t *lock);
41void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t);
42void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t);
43void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t);
44void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t);
45void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
46void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
47void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t);
48void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
49void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
50void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
51 __releases(spinlock_t);
52void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
53 __releases(rwlock_t);
54void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
55 __releases(rwlock_t);
56
57#endif /* __LINUX_SPINLOCK_API_SMP_H */