aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 95e0615f4d75..6fe0363724e9 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Read-Copy Update mechanism for mutual exclusion 2 * Read-Copy Update mechanism for mutual exclusion
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
18 * Copyright IBM Corporation, 2001 18 * Copyright IBM Corporation, 2001
19 * 19 *
20 * Author: Dipankar Sarma <dipankar@in.ibm.com> 20 * Author: Dipankar Sarma <dipankar@in.ibm.com>
21 * 21 *
22 * Based on the original work by Paul McKenney <paulmck@us.ibm.com> 22 * Based on the original work by Paul McKenney <paulmck@us.ibm.com>
23 * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. 23 * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
24 * Papers: 24 * Papers:
@@ -26,7 +26,7 @@
26 * http://lse.sourceforge.net/locking/rclock_OLS.2001.05.01c.sc.pdf (OLS2001) 26 * http://lse.sourceforge.net/locking/rclock_OLS.2001.05.01c.sc.pdf (OLS2001)
27 * 27 *
28 * For detailed explanation of Read-Copy Update mechanism see - 28 * For detailed explanation of Read-Copy Update mechanism see -
29 * http://lse.sourceforge.net/locking/rcupdate.html 29 * http://lse.sourceforge.net/locking/rcupdate.html
30 * 30 *
31 */ 31 */
32 32
@@ -52,8 +52,13 @@ struct rcu_head {
52}; 52};
53 53
54/* Exported common interfaces */ 54/* Exported common interfaces */
55#ifdef CONFIG_TREE_PREEMPT_RCU
55extern void synchronize_rcu(void); 56extern void synchronize_rcu(void);
57#else /* #ifdef CONFIG_TREE_PREEMPT_RCU */
58#define synchronize_rcu synchronize_sched
59#endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */
56extern void synchronize_rcu_bh(void); 60extern void synchronize_rcu_bh(void);
61extern void synchronize_sched(void);
57extern void rcu_barrier(void); 62extern void rcu_barrier(void);
58extern void rcu_barrier_bh(void); 63extern void rcu_barrier_bh(void);
59extern void rcu_barrier_sched(void); 64extern void rcu_barrier_sched(void);
@@ -262,24 +267,6 @@ struct rcu_synchronize {
262extern void wakeme_after_rcu(struct rcu_head *head); 267extern void wakeme_after_rcu(struct rcu_head *head);
263 268
264/** 269/**
265 * synchronize_sched - block until all CPUs have exited any non-preemptive
266 * kernel code sequences.
267 *
268 * This means that all preempt_disable code sequences, including NMI and
269 * hardware-interrupt handlers, in progress on entry will have completed
270 * before this primitive returns. However, this does not guarantee that
271 * softirq handlers will have completed, since in some kernels, these
272 * handlers can run in process context, and can block.
273 *
274 * This primitive provides the guarantees made by the (now removed)
275 * synchronize_kernel() API. In contrast, synchronize_rcu() only
276 * guarantees that rcu_read_lock() sections will have completed.
277 * In "classic RCU", these two guarantees happen to be one and
278 * the same, but can differ in realtime RCU implementations.
279 */
280#define synchronize_sched() __synchronize_sched()
281
282/**
283 * call_rcu - Queue an RCU callback for invocation after a grace period. 270 * call_rcu - Queue an RCU callback for invocation after a grace period.
284 * @head: structure to be used for queueing the RCU updates. 271 * @head: structure to be used for queueing the RCU updates.
285 * @func: actual update function to be invoked after the grace period 272 * @func: actual update function to be invoked after the grace period