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.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 9642c6bcb399..42cc3a04779e 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -34,8 +34,6 @@ struct notifier_block;
34 34
35extern void rcu_sched_qs(int cpu); 35extern void rcu_sched_qs(int cpu);
36extern void rcu_bh_qs(int cpu); 36extern void rcu_bh_qs(int cpu);
37extern int rcu_cpu_notify(struct notifier_block *self,
38 unsigned long action, void *hcpu);
39extern int rcu_needs_cpu(int cpu); 37extern int rcu_needs_cpu(int cpu);
40extern int rcu_expedited_torture_stats(char *page); 38extern int rcu_expedited_torture_stats(char *page);
41 39
@@ -43,8 +41,15 @@ extern int rcu_expedited_torture_stats(char *page);
43 41
44extern void __rcu_read_lock(void); 42extern void __rcu_read_lock(void);
45extern void __rcu_read_unlock(void); 43extern void __rcu_read_unlock(void);
44extern void synchronize_rcu(void);
46extern void exit_rcu(void); 45extern void exit_rcu(void);
47 46
47/*
48 * Defined as macro as it is a very low level header
49 * included from areas that don't even know about current
50 */
51#define rcu_preempt_depth() (current->rcu_read_lock_nesting)
52
48#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */ 53#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
49 54
50static inline void __rcu_read_lock(void) 55static inline void __rcu_read_lock(void)
@@ -57,12 +62,17 @@ static inline void __rcu_read_unlock(void)
57 preempt_enable(); 62 preempt_enable();
58} 63}
59 64
60#define __synchronize_sched() synchronize_rcu() 65#define synchronize_rcu synchronize_sched
61 66
62static inline void exit_rcu(void) 67static inline void exit_rcu(void)
63{ 68{
64} 69}
65 70
71static inline int rcu_preempt_depth(void)
72{
73 return 0;
74}
75
66#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ 76#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
67 77
68static inline void __rcu_read_lock_bh(void) 78static inline void __rcu_read_lock_bh(void)
@@ -83,12 +93,14 @@ static inline void synchronize_rcu_bh_expedited(void)
83 synchronize_sched_expedited(); 93 synchronize_sched_expedited();
84} 94}
85 95
86extern void __rcu_init(void);
87extern void rcu_check_callbacks(int cpu, int user); 96extern void rcu_check_callbacks(int cpu, int user);
88 97
89extern long rcu_batches_completed(void); 98extern long rcu_batches_completed(void);
90extern long rcu_batches_completed_bh(void); 99extern long rcu_batches_completed_bh(void);
91extern long rcu_batches_completed_sched(void); 100extern long rcu_batches_completed_sched(void);
101extern void rcu_force_quiescent_state(void);
102extern void rcu_bh_force_quiescent_state(void);
103extern void rcu_sched_force_quiescent_state(void);
92 104
93#ifdef CONFIG_NO_HZ 105#ifdef CONFIG_NO_HZ
94void rcu_enter_nohz(void); 106void rcu_enter_nohz(void);