]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
rcu: eliminate synchronize_rcu_xxx macro
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 4 Jan 2009 21:03:02 +0000 (13:03 -0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 Jan 2009 09:18:08 +0000 (10:18 +0100)
Impact: cleanup

Expand macro into two files.

The synchronize_rcu_xxx macro is quite ugly and it's only used by two
callers, so expand it instead.  This makes this code easier to change.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/rcupdate.h
kernel/rcupdate.c
kernel/rcupreempt.c

index 1168fbcea8d4bc6a42d4abccf5b05e47266aa418..921340a7b71cf4c88638e2f905aa0fdc1385f958 100644 (file)
@@ -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.
index ad63af8b25218f562729d868293285ce3433cff8..d92a76a881aa47a9aa059c3221910834f6c50cf8 100644 (file)
@@ -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)
index f9dc8f3720f67ae977628f76f250d0ed8b05b4d5..33cfc50781f9968d06e79edcb93049441a2a4231 100644 (file)
@@ -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);
 
 /*