diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2009-08-22 16:56:47 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-23 04:32:37 -0400 |
commit | bc33f24bdca8b6e97376e3a182ab69e6cdefa989 (patch) | |
tree | 86b56c35677fe19e6a2f39414526ece3625dcb32 /include/linux/rcutree.h | |
parent | d6714c22b43fbcbead7e7b706ff270e15f04a791 (diff) |
rcu: Consolidate sparse and lockdep declarations in include/linux/rcupdate.h
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: akpm@linux-foundation.org
Cc: mathieu.desnoyers@polymtl.ca
Cc: josht@linux.vnet.ibm.com
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
LKML-Reference: <12509746132349-git-send-email->
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r-- | include/linux/rcutree.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index a0852d0d915b..8a0222ce3b13 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -36,38 +36,20 @@ extern void rcu_bh_qs(int cpu); | |||
36 | extern int rcu_pending(int cpu); | 36 | extern int rcu_pending(int cpu); |
37 | extern int rcu_needs_cpu(int cpu); | 37 | extern int rcu_needs_cpu(int cpu); |
38 | 38 | ||
39 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
40 | extern struct lockdep_map rcu_lock_map; | ||
41 | # define rcu_read_acquire() \ | ||
42 | lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_) | ||
43 | # define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) | ||
44 | #else | ||
45 | # define rcu_read_acquire() do { } while (0) | ||
46 | # define rcu_read_release() do { } while (0) | ||
47 | #endif | ||
48 | |||
49 | static inline void __rcu_read_lock(void) | 39 | static inline void __rcu_read_lock(void) |
50 | { | 40 | { |
51 | preempt_disable(); | 41 | preempt_disable(); |
52 | __acquire(RCU); | ||
53 | rcu_read_acquire(); | ||
54 | } | 42 | } |
55 | static inline void __rcu_read_unlock(void) | 43 | static inline void __rcu_read_unlock(void) |
56 | { | 44 | { |
57 | rcu_read_release(); | ||
58 | __release(RCU); | ||
59 | preempt_enable(); | 45 | preempt_enable(); |
60 | } | 46 | } |
61 | static inline void __rcu_read_lock_bh(void) | 47 | static inline void __rcu_read_lock_bh(void) |
62 | { | 48 | { |
63 | local_bh_disable(); | 49 | local_bh_disable(); |
64 | __acquire(RCU_BH); | ||
65 | rcu_read_acquire(); | ||
66 | } | 50 | } |
67 | static inline void __rcu_read_unlock_bh(void) | 51 | static inline void __rcu_read_unlock_bh(void) |
68 | { | 52 | { |
69 | rcu_read_release(); | ||
70 | __release(RCU_BH); | ||
71 | local_bh_enable(); | 53 | local_bh_enable(); |
72 | } | 54 | } |
73 | 55 | ||