aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJosh Triplett <josht@us.ibm.com>2006-09-29 05:00:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:19 -0400
commit9f50b93f066f8dc339de9b0eb78a22a75e6c8f8f (patch)
tree9977ea31409d3ac73b9b47b9d0c5d3f0c7cbea87 /include
parent92e9a8507ba81ff9e25bd9c5030ff8586269eefb (diff)
[PATCH] Make spinlock/rwlock annotations more accurate by using parameters, not types
The lock annotations used on spinlocks and rwlocks currently use __{acquires,releases}(spinlock_t) and __{acquires,releases}(rwlock_t), respectively. This loses the information of which lock actually got acquired or released, and assumes a different type for the parameter of __acquires and __releases than the rest of the kernel. While the current implementations of __acquires and __releases throw away their argument, this will not always remain the case. Change this to use the lock parameter instead, to preserve this information and increase consistency in usage of __acquires and __releases. Signed-off-by: Josh Triplett <josh@freedesktop.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/spinlock_api_smp.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/include/linux/spinlock_api_smp.h b/include/linux/spinlock_api_smp.h
index b2c4f8299464..8828b8155e9c 100644
--- a/include/linux/spinlock_api_smp.h
+++ b/include/linux/spinlock_api_smp.h
@@ -19,41 +19,41 @@ int in_lock_functions(unsigned long addr);
19 19
20#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x)) 20#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x))
21 21
22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t); 22void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock);
23void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) 23void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
24 __acquires(spinlock_t); 24 __acquires(lock);
25void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t); 25void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock);
26void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t); 26void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock);
27void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t); 27void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock);
28void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t); 28void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(lock);
29void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t); 29void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(lock);
30void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t); 30void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(lock);
31void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t); 31void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(lock);
32void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t); 32void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(lock);
33unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock) 33unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
34 __acquires(spinlock_t); 34 __acquires(lock);
35unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock) 35unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
36 __acquires(rwlock_t); 36 __acquires(lock);
37unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock) 37unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock)
38 __acquires(rwlock_t); 38 __acquires(lock);
39int __lockfunc _spin_trylock(spinlock_t *lock); 39int __lockfunc _spin_trylock(spinlock_t *lock);
40int __lockfunc _read_trylock(rwlock_t *lock); 40int __lockfunc _read_trylock(rwlock_t *lock);
41int __lockfunc _write_trylock(rwlock_t *lock); 41int __lockfunc _write_trylock(rwlock_t *lock);
42int __lockfunc _spin_trylock_bh(spinlock_t *lock); 42int __lockfunc _spin_trylock_bh(spinlock_t *lock);
43void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t); 43void __lockfunc _spin_unlock(spinlock_t *lock) __releases(lock);
44void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t); 44void __lockfunc _read_unlock(rwlock_t *lock) __releases(lock);
45void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t); 45void __lockfunc _write_unlock(rwlock_t *lock) __releases(lock);
46void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t); 46void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(lock);
47void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t); 47void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(lock);
48void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t); 48void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(lock);
49void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t); 49void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(lock);
50void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t); 50void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(lock);
51void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t); 51void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(lock);
52void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) 52void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
53 __releases(spinlock_t); 53 __releases(lock);
54void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) 54void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
55 __releases(rwlock_t); 55 __releases(lock);
56void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) 56void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
57 __releases(rwlock_t); 57 __releases(lock);
58 58
59#endif /* __LINUX_SPINLOCK_API_SMP_H */ 59#endif /* __LINUX_SPINLOCK_API_SMP_H */