diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-27 01:14:36 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-09-29 00:36:42 -0400 |
commit | 2c42818e962e2858334bf45bfc56662b3752df34 (patch) | |
tree | 192364123c9aeeab282c53168e51eddece9d8be4 /include/linux/rcutiny.h | |
parent | f039d1f1884b2fe9c13d28f59d8330f0b0518fc4 (diff) |
rcu: Abstract common code for RCU grace-period-wait primitives
Pull the code that waits for an RCU grace period into a single function,
which is then called by synchronize_rcu() and friends in the case of
TREE_RCU and TREE_PREEMPT_RCU, and from rcu_barrier() and friends in
the case of TINY_RCU and TINY_PREEMPT_RCU.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/rcutiny.h')
-rw-r--r-- | include/linux/rcutiny.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 52b3e0281fd0..4eab233a00cd 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -31,6 +31,16 @@ static inline void rcu_init(void) | |||
31 | { | 31 | { |
32 | } | 32 | } |
33 | 33 | ||
34 | static inline void rcu_barrier_bh(void) | ||
35 | { | ||
36 | wait_rcu_gp(call_rcu_bh); | ||
37 | } | ||
38 | |||
39 | static inline void rcu_barrier_sched(void) | ||
40 | { | ||
41 | wait_rcu_gp(call_rcu_sched); | ||
42 | } | ||
43 | |||
34 | #ifdef CONFIG_TINY_RCU | 44 | #ifdef CONFIG_TINY_RCU |
35 | 45 | ||
36 | static inline void synchronize_rcu_expedited(void) | 46 | static inline void synchronize_rcu_expedited(void) |
@@ -45,9 +55,13 @@ static inline void rcu_barrier(void) | |||
45 | 55 | ||
46 | #else /* #ifdef CONFIG_TINY_RCU */ | 56 | #else /* #ifdef CONFIG_TINY_RCU */ |
47 | 57 | ||
48 | void rcu_barrier(void); | ||
49 | void synchronize_rcu_expedited(void); | 58 | void synchronize_rcu_expedited(void); |
50 | 59 | ||
60 | static inline void rcu_barrier(void) | ||
61 | { | ||
62 | wait_rcu_gp(call_rcu); | ||
63 | } | ||
64 | |||
51 | #endif /* #else #ifdef CONFIG_TINY_RCU */ | 65 | #endif /* #else #ifdef CONFIG_TINY_RCU */ |
52 | 66 | ||
53 | static inline void synchronize_rcu_bh(void) | 67 | static inline void synchronize_rcu_bh(void) |