aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcutree.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r--include/linux/rcutree.h18
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);
36extern int rcu_pending(int cpu); 36extern int rcu_pending(int cpu);
37extern int rcu_needs_cpu(int cpu); 37extern int rcu_needs_cpu(int cpu);
38 38
39#ifdef CONFIG_DEBUG_LOCK_ALLOC
40extern 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
49static inline void __rcu_read_lock(void) 39static inline void __rcu_read_lock(void)
50{ 40{
51 preempt_disable(); 41 preempt_disable();
52 __acquire(RCU);
53 rcu_read_acquire();
54} 42}
55static inline void __rcu_read_unlock(void) 43static inline void __rcu_read_unlock(void)
56{ 44{
57 rcu_read_release();
58 __release(RCU);
59 preempt_enable(); 45 preempt_enable();
60} 46}
61static inline void __rcu_read_lock_bh(void) 47static 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}
67static inline void __rcu_read_unlock_bh(void) 51static 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