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 /kernel/rcutree_plugin.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 'kernel/rcutree_plugin.h')
-rw-r--r-- | kernel/rcutree_plugin.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 970329853dc5..43daa46bc6f2 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -656,18 +656,9 @@ EXPORT_SYMBOL_GPL(call_rcu); | |||
656 | */ | 656 | */ |
657 | void synchronize_rcu(void) | 657 | void synchronize_rcu(void) |
658 | { | 658 | { |
659 | struct rcu_synchronize rcu; | ||
660 | |||
661 | if (!rcu_scheduler_active) | 659 | if (!rcu_scheduler_active) |
662 | return; | 660 | return; |
663 | 661 | wait_rcu_gp(call_rcu); | |
664 | init_rcu_head_on_stack(&rcu.head); | ||
665 | init_completion(&rcu.completion); | ||
666 | /* Will wake me after RCU finished. */ | ||
667 | call_rcu(&rcu.head, wakeme_after_rcu); | ||
668 | /* Wait for it. */ | ||
669 | wait_for_completion(&rcu.completion); | ||
670 | destroy_rcu_head_on_stack(&rcu.head); | ||
671 | } | 662 | } |
672 | EXPORT_SYMBOL_GPL(synchronize_rcu); | 663 | EXPORT_SYMBOL_GPL(synchronize_rcu); |
673 | 664 | ||