From 5e6b23a6d94f0c1ae4bc34bd8ee4942938d757f6 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 19 Dec 2011 14:26:53 -0500 Subject: [PATCH] Cleanup DEFINE_RCU_FLAVOR() Signed-off-by: Mathieu Desnoyers --- urcu-bp.c | 2 +- urcu-flavor.h | 6 +++--- urcu-qsbr.c | 2 +- urcu.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/urcu-bp.c b/urcu-bp.c index 912e9b2..08b4b55 100644 --- a/urcu-bp.c +++ b/urcu-bp.c @@ -444,7 +444,7 @@ void *rcu_cmpxchg_pointer_sym_bp(void **p, void *old, void *_new) return uatomic_cmpxchg(p, old, _new); } -DEFINE_RCU_FLAVOR() +DEFINE_RCU_FLAVOR(rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h" diff --git a/urcu-flavor.h b/urcu-flavor.h index e46c9a1..9af4d0e 100644 --- a/urcu-flavor.h +++ b/urcu-flavor.h @@ -42,8 +42,8 @@ struct rcu_flavor_struct { void (*unregister_thread)(void); }; -#define DEFINE_RCU_FLAVOR() \ -const struct rcu_flavor_struct rcu_flavor = { \ +#define DEFINE_RCU_FLAVOR(x) \ +const struct rcu_flavor_struct x = { \ .read_lock = rcu_read_lock, \ .read_unlock = rcu_read_unlock, \ .read_quiescent_state = rcu_quiescent_state, \ @@ -54,7 +54,7 @@ const struct rcu_flavor_struct rcu_flavor = { \ .thread_online = rcu_thread_online, \ .register_thread = rcu_register_thread, \ .unregister_thread = rcu_unregister_thread,\ -}; +} extern const struct rcu_flavor_struct rcu_flavor; diff --git a/urcu-qsbr.c b/urcu-qsbr.c index 06e81c7..745676e 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -356,7 +356,7 @@ void rcu_exit(void) */ } -DEFINE_RCU_FLAVOR() +DEFINE_RCU_FLAVOR(rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h" diff --git a/urcu.c b/urcu.c index b434655..3948629 100644 --- a/urcu.c +++ b/urcu.c @@ -452,7 +452,7 @@ void rcu_exit(void) #endif /* #ifdef RCU_SIGNAL */ -DEFINE_RCU_FLAVOR() +DEFINE_RCU_FLAVOR(rcu_flavor); #include "urcu-call-rcu-impl.h" #include "urcu-defer-impl.h" -- 2.34.1