aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-11-22 11:53:50 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-22 12:58:16 -0500
commit6ebb237bece23275d1da149b61a342f0d4d06a08 (patch)
tree5f3d99f6ce2e1e98736e5708eecb5bf217f78fde /kernel/rcutree_plugin.h
parent9f680ab41485edfdc96331b70afa7513aa0a7720 (diff)
rcu: Re-arrange code to reduce #ifdef pain
Remove #ifdefs from kernel/rcupdate.c and include/linux/rcupdate.h by moving code to include/linux/rcutiny.h, include/linux/rcutree.h, and kernel/rcutree.c. Also remove some definitions that are no longer used. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: josh@joshtriplett.org Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com LKML-Reference: <1258908830885-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 0bdb592eee66..1d295c789d3d 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -425,6 +425,30 @@ void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu))
425} 425}
426EXPORT_SYMBOL_GPL(call_rcu); 426EXPORT_SYMBOL_GPL(call_rcu);
427 427
428/**
429 * synchronize_rcu - wait until a grace period has elapsed.
430 *
431 * Control will return to the caller some time after a full grace
432 * period has elapsed, in other words after all currently executing RCU
433 * read-side critical sections have completed. RCU read-side critical
434 * sections are delimited by rcu_read_lock() and rcu_read_unlock(),
435 * and may be nested.
436 */
437void synchronize_rcu(void)
438{
439 struct rcu_synchronize rcu;
440
441 if (!rcu_scheduler_active)
442 return;
443
444 init_completion(&rcu.completion);
445 /* Will wake me after RCU finished. */
446 call_rcu(&rcu.head, wakeme_after_rcu);
447 /* Wait for it. */
448 wait_for_completion(&rcu.completion);
449}
450EXPORT_SYMBOL_GPL(synchronize_rcu);
451
428/* 452/*
429 * Wait for an rcu-preempt grace period. We are supposed to expedite the 453 * Wait for an rcu-preempt grace period. We are supposed to expedite the
430 * grace period, but this is the crude slow compatability hack, so just 454 * grace period, but this is the crude slow compatability hack, so just