diff options
Diffstat (limited to 'include/linux/rcupdate.h')
| -rw-r--r-- | include/linux/rcupdate.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 895dc9c1088c..921340a7b71c 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -52,11 +52,15 @@ struct rcu_head { | |||
| 52 | void (*func)(struct rcu_head *head); | 52 | void (*func)(struct rcu_head *head); |
| 53 | }; | 53 | }; |
| 54 | 54 | ||
| 55 | #ifdef CONFIG_CLASSIC_RCU | 55 | #if defined(CONFIG_CLASSIC_RCU) |
| 56 | #include <linux/rcuclassic.h> | 56 | #include <linux/rcuclassic.h> |
| 57 | #else /* #ifdef CONFIG_CLASSIC_RCU */ | 57 | #elif defined(CONFIG_TREE_RCU) |
| 58 | #include <linux/rcutree.h> | ||
| 59 | #elif defined(CONFIG_PREEMPT_RCU) | ||
| 58 | #include <linux/rcupreempt.h> | 60 | #include <linux/rcupreempt.h> |
| 59 | #endif /* #else #ifdef CONFIG_CLASSIC_RCU */ | 61 | #else |
| 62 | #error "Unknown RCU implementation specified to kernel configuration" | ||
| 63 | #endif /* #else #if defined(CONFIG_CLASSIC_RCU) */ | ||
| 60 | 64 | ||
| 61 | #define RCU_HEAD_INIT { .next = NULL, .func = NULL } | 65 | #define RCU_HEAD_INIT { .next = NULL, .func = NULL } |
| 62 | #define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT | 66 | #define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT |
| @@ -200,18 +204,6 @@ struct rcu_synchronize { | |||
| 200 | 204 | ||
| 201 | extern void wakeme_after_rcu(struct rcu_head *head); | 205 | extern void wakeme_after_rcu(struct rcu_head *head); |
| 202 | 206 | ||
| 203 | #define synchronize_rcu_xxx(name, func) \ | ||
| 204 | void name(void) \ | ||
| 205 | { \ | ||
| 206 | struct rcu_synchronize rcu; \ | ||
| 207 | \ | ||
| 208 | init_completion(&rcu.completion); \ | ||
| 209 | /* Will wake me after RCU finished. */ \ | ||
| 210 | func(&rcu.head, wakeme_after_rcu); \ | ||
| 211 | /* Wait for it. */ \ | ||
| 212 | wait_for_completion(&rcu.completion); \ | ||
| 213 | } | ||
| 214 | |||
| 215 | /** | 207 | /** |
| 216 | * synchronize_sched - block until all CPUs have exited any non-preemptive | 208 | * synchronize_sched - block until all CPUs have exited any non-preemptive |
| 217 | * kernel code sequences. | 209 | * kernel code sequences. |
