From f1d2d09c2b5a44b78d869317dc7cae47315e315e Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Sun, 4 Jan 2009 13:03:02 -0800 Subject: [PATCH] --- yaml --- r: 126791 b: refs/heads/master c: ea7d3fef4222cd98556a0b386598268d4dbf6670 h: refs/heads/master i: 126789: fa98715d233df5da2879f2024b33e0dfcceebd01 126787: 5c92f8d0fd28b6f0bea821c97d0dfa425df80888 126783: 82ce80aa9c1b773fe39db1b8d5a687f84e3a8eb7 v: v3 --- [refs] | 2 +- trunk/include/linux/rcupdate.h | 12 ------------ trunk/kernel/rcupdate.c | 11 +++++++++-- trunk/kernel/rcupreempt.c | 11 ++++++++++- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 79e8bf3b0c8e..0aa4e3e852a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 90a4d2c0106bb690f0b6af3d506febc35c658aa7 +refs/heads/master: ea7d3fef4222cd98556a0b386598268d4dbf6670 diff --git a/trunk/include/linux/rcupdate.h b/trunk/include/linux/rcupdate.h index 1168fbcea8d4..921340a7b71c 100644 --- a/trunk/include/linux/rcupdate.h +++ b/trunk/include/linux/rcupdate.h @@ -204,18 +204,6 @@ struct rcu_synchronize { extern void wakeme_after_rcu(struct rcu_head *head); -#define synchronize_rcu_xxx(name, func) \ -void name(void) \ -{ \ - struct rcu_synchronize rcu; \ - \ - init_completion(&rcu.completion); \ - /* Will wake me after RCU finished. */ \ - func(&rcu.head, wakeme_after_rcu); \ - /* Wait for it. */ \ - wait_for_completion(&rcu.completion); \ -} - /** * synchronize_sched - block until all CPUs have exited any non-preemptive * kernel code sequences. diff --git a/trunk/kernel/rcupdate.c b/trunk/kernel/rcupdate.c index ad63af8b2521..d92a76a881aa 100644 --- a/trunk/kernel/rcupdate.c +++ b/trunk/kernel/rcupdate.c @@ -77,8 +77,15 @@ void wakeme_after_rcu(struct rcu_head *head) * sections are delimited by rcu_read_lock() and rcu_read_unlock(), * and may be nested. */ -void synchronize_rcu(void); /* Makes kernel-doc tools happy */ -synchronize_rcu_xxx(synchronize_rcu, call_rcu) +void synchronize_rcu(void) +{ + struct rcu_synchronize rcu; + init_completion(&rcu.completion); + /* Will wake me after RCU finished. */ + call_rcu(&rcu.head, wakeme_after_rcu); + /* Wait for it. */ + wait_for_completion(&rcu.completion); +} EXPORT_SYMBOL_GPL(synchronize_rcu); static void rcu_barrier_callback(struct rcu_head *notused) diff --git a/trunk/kernel/rcupreempt.c b/trunk/kernel/rcupreempt.c index f9dc8f3720f6..33cfc50781f9 100644 --- a/trunk/kernel/rcupreempt.c +++ b/trunk/kernel/rcupreempt.c @@ -1177,7 +1177,16 @@ EXPORT_SYMBOL_GPL(call_rcu_sched); * in -rt this does -not- necessarily result in all currently executing * interrupt -handlers- having completed. */ -synchronize_rcu_xxx(__synchronize_sched, call_rcu_sched) +void __synchronize_sched(void) +{ + struct rcu_synchronize rcu; + + init_completion(&rcu.completion); + /* Will wake me after RCU finished. */ + call_rcu_sched(&rcu.head, wakeme_after_rcu); + /* Wait for it. */ + wait_for_completion(&rcu.completion); +} EXPORT_SYMBOL_GPL(__synchronize_sched); /*