diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcupdate.c | 11 | ||||
-rw-r--r-- | kernel/rcupreempt.c | 11 |
2 files changed, 19 insertions, 3 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index ad63af8b2521..d92a76a881aa 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -77,8 +77,15 @@ void wakeme_after_rcu(struct rcu_head *head) | |||
77 | * sections are delimited by rcu_read_lock() and rcu_read_unlock(), | 77 | * sections are delimited by rcu_read_lock() and rcu_read_unlock(), |
78 | * and may be nested. | 78 | * and may be nested. |
79 | */ | 79 | */ |
80 | void synchronize_rcu(void); /* Makes kernel-doc tools happy */ | 80 | void synchronize_rcu(void) |
81 | synchronize_rcu_xxx(synchronize_rcu, call_rcu) | 81 | { |
82 | struct rcu_synchronize rcu; | ||
83 | init_completion(&rcu.completion); | ||
84 | /* Will wake me after RCU finished. */ | ||
85 | call_rcu(&rcu.head, wakeme_after_rcu); | ||
86 | /* Wait for it. */ | ||
87 | wait_for_completion(&rcu.completion); | ||
88 | } | ||
82 | EXPORT_SYMBOL_GPL(synchronize_rcu); | 89 | EXPORT_SYMBOL_GPL(synchronize_rcu); |
83 | 90 | ||
84 | static void rcu_barrier_callback(struct rcu_head *notused) | 91 | static void rcu_barrier_callback(struct rcu_head *notused) |
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index f9dc8f3720f6..33cfc50781f9 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
@@ -1177,7 +1177,16 @@ EXPORT_SYMBOL_GPL(call_rcu_sched); | |||
1177 | * in -rt this does -not- necessarily result in all currently executing | 1177 | * in -rt this does -not- necessarily result in all currently executing |
1178 | * interrupt -handlers- having completed. | 1178 | * interrupt -handlers- having completed. |
1179 | */ | 1179 | */ |
1180 | synchronize_rcu_xxx(__synchronize_sched, call_rcu_sched) | 1180 | void __synchronize_sched(void) |
1181 | { | ||
1182 | struct rcu_synchronize rcu; | ||
1183 | |||
1184 | init_completion(&rcu.completion); | ||
1185 | /* Will wake me after RCU finished. */ | ||
1186 | call_rcu_sched(&rcu.head, wakeme_after_rcu); | ||
1187 | /* Wait for it. */ | ||
1188 | wait_for_completion(&rcu.completion); | ||
1189 | } | ||
1181 | EXPORT_SYMBOL_GPL(__synchronize_sched); | 1190 | EXPORT_SYMBOL_GPL(__synchronize_sched); |
1182 | 1191 | ||
1183 | /* | 1192 | /* |