diff options
Diffstat (limited to 'include/linux/rcutiny.h')
-rw-r--r-- | include/linux/rcutiny.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index a5195875480a..14e5a76b2c06 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -29,6 +29,10 @@ | |||
29 | 29 | ||
30 | void rcu_sched_qs(int cpu); | 30 | void rcu_sched_qs(int cpu); |
31 | void rcu_bh_qs(int cpu); | 31 | void rcu_bh_qs(int cpu); |
32 | static inline void rcu_note_context_switch(int cpu) | ||
33 | { | ||
34 | rcu_sched_qs(cpu); | ||
35 | } | ||
32 | 36 | ||
33 | #define __rcu_read_lock() preempt_disable() | 37 | #define __rcu_read_lock() preempt_disable() |
34 | #define __rcu_read_unlock() preempt_enable() | 38 | #define __rcu_read_unlock() preempt_enable() |
@@ -74,7 +78,17 @@ static inline void rcu_sched_force_quiescent_state(void) | |||
74 | { | 78 | { |
75 | } | 79 | } |
76 | 80 | ||
77 | #define synchronize_rcu synchronize_sched | 81 | extern void synchronize_sched(void); |
82 | |||
83 | static inline void synchronize_rcu(void) | ||
84 | { | ||
85 | synchronize_sched(); | ||
86 | } | ||
87 | |||
88 | static inline void synchronize_rcu_bh(void) | ||
89 | { | ||
90 | synchronize_sched(); | ||
91 | } | ||
78 | 92 | ||
79 | static inline void synchronize_rcu_expedited(void) | 93 | static inline void synchronize_rcu_expedited(void) |
80 | { | 94 | { |
@@ -114,4 +128,17 @@ static inline int rcu_preempt_depth(void) | |||
114 | return 0; | 128 | return 0; |
115 | } | 129 | } |
116 | 130 | ||
131 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
132 | |||
133 | extern int rcu_scheduler_active __read_mostly; | ||
134 | extern void rcu_scheduler_starting(void); | ||
135 | |||
136 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
137 | |||
138 | static inline void rcu_scheduler_starting(void) | ||
139 | { | ||
140 | } | ||
141 | |||
142 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
143 | |||
117 | #endif /* __LINUX_RCUTINY_H */ | 144 | #endif /* __LINUX_RCUTINY_H */ |