diff options
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r-- | include/linux/rcutree.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index a89307717825..46e9ab3ee6e1 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -24,16 +24,20 @@ | |||
24 | * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. | 24 | * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. |
25 | * | 25 | * |
26 | * For detailed explanation of Read-Copy Update mechanism see - | 26 | * For detailed explanation of Read-Copy Update mechanism see - |
27 | * Documentation/RCU | 27 | * Documentation/RCU |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
32 | 32 | ||
33 | struct notifier_block; | ||
34 | |||
33 | extern void rcu_sched_qs(int cpu); | 35 | extern void rcu_sched_qs(int cpu); |
34 | extern void rcu_bh_qs(int cpu); | 36 | extern void rcu_bh_qs(int cpu); |
35 | 37 | extern int rcu_cpu_notify(struct notifier_block *self, | |
38 | unsigned long action, void *hcpu); | ||
36 | extern int rcu_needs_cpu(int cpu); | 39 | extern int rcu_needs_cpu(int cpu); |
40 | extern int rcu_expedited_torture_stats(char *page); | ||
37 | 41 | ||
38 | #ifdef CONFIG_TREE_PREEMPT_RCU | 42 | #ifdef CONFIG_TREE_PREEMPT_RCU |
39 | 43 | ||
@@ -53,6 +57,8 @@ static inline void __rcu_read_unlock(void) | |||
53 | preempt_enable(); | 57 | preempt_enable(); |
54 | } | 58 | } |
55 | 59 | ||
60 | #define __synchronize_sched() synchronize_rcu() | ||
61 | |||
56 | static inline void exit_rcu(void) | 62 | static inline void exit_rcu(void) |
57 | { | 63 | { |
58 | } | 64 | } |
@@ -68,8 +74,6 @@ static inline void __rcu_read_unlock_bh(void) | |||
68 | local_bh_enable(); | 74 | local_bh_enable(); |
69 | } | 75 | } |
70 | 76 | ||
71 | #define __synchronize_sched() synchronize_rcu() | ||
72 | |||
73 | extern void call_rcu_sched(struct rcu_head *head, | 77 | extern void call_rcu_sched(struct rcu_head *head, |
74 | void (*func)(struct rcu_head *rcu)); | 78 | void (*func)(struct rcu_head *rcu)); |
75 | 79 | ||
@@ -85,16 +89,11 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
85 | 89 | ||
86 | extern void __rcu_init(void); | 90 | extern void __rcu_init(void); |
87 | extern void rcu_check_callbacks(int cpu, int user); | 91 | extern void rcu_check_callbacks(int cpu, int user); |
88 | extern void rcu_restart_cpu(int cpu); | ||
89 | 92 | ||
90 | extern long rcu_batches_completed(void); | 93 | extern long rcu_batches_completed(void); |
91 | extern long rcu_batches_completed_bh(void); | 94 | extern long rcu_batches_completed_bh(void); |
92 | extern long rcu_batches_completed_sched(void); | 95 | extern long rcu_batches_completed_sched(void); |
93 | 96 | ||
94 | static inline void rcu_init_sched(void) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | #ifdef CONFIG_NO_HZ | 97 | #ifdef CONFIG_NO_HZ |
99 | void rcu_enter_nohz(void); | 98 | void rcu_enter_nohz(void); |
100 | void rcu_exit_nohz(void); | 99 | void rcu_exit_nohz(void); |
@@ -107,7 +106,7 @@ static inline void rcu_exit_nohz(void) | |||
107 | } | 106 | } |
108 | #endif /* CONFIG_NO_HZ */ | 107 | #endif /* CONFIG_NO_HZ */ |
109 | 108 | ||
110 | /* A context switch is a grace period for rcutree. */ | 109 | /* A context switch is a grace period for RCU-sched and RCU-bh. */ |
111 | static inline int rcu_blocking_is_gp(void) | 110 | static inline int rcu_blocking_is_gp(void) |
112 | { | 111 | { |
113 | return num_online_cpus() == 1; | 112 | return num_online_cpus() == 1; |