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