From: Mathieu Desnoyers Date: Mon, 6 May 2013 14:24:14 +0000 (-0400) Subject: Fix: struct urcu_gp broke multiflavor X-Git-Tag: v0.8.0~84 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4de0cd31491bcb93a19c14fc1eb2a2a23ce12855;p=userspace-rcu.git Fix: struct urcu_gp broke multiflavor Add mapping to namespace urcu_gp. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-qsbr.c b/urcu-qsbr.c index 5bdf259..d6adc5b 100644 --- a/urcu-qsbr.c +++ b/urcu-qsbr.c @@ -53,7 +53,7 @@ void __attribute__((destructor)) rcu_exit(void); static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER; -struct urcu_gp rcu_gp = { .ctr = RCU_GP_ONLINE }; +struct rcu_gp rcu_gp = { .ctr = RCU_GP_ONLINE }; /* * Active attempts to check for reader Q.S. before calling futex(). diff --git a/urcu.c b/urcu.c index da6839f..b3f94da 100644 --- a/urcu.c +++ b/urcu.c @@ -83,7 +83,7 @@ void __attribute__((destructor)) rcu_exit(void); #endif static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER; -struct urcu_gp rcu_gp = { .ctr = RCU_GP_COUNT }; +struct rcu_gp rcu_gp = { .ctr = RCU_GP_COUNT }; /* * Written to only by each individual reader. Read by both the reader and the diff --git a/urcu/map/urcu-qsbr.h b/urcu/map/urcu-qsbr.h index c40af35..e3261ff 100644 --- a/urcu/map/urcu-qsbr.h +++ b/urcu/map/urcu-qsbr.h @@ -49,8 +49,7 @@ #define rcu_exit rcu_exit_qsbr #define synchronize_rcu synchronize_rcu_qsbr #define rcu_reader rcu_reader_qsbr -#define rcu_gp_ctr rcu_gp_ctr_qsbr -#define rcu_gp_futex rcu_gp_futex_qsbr +#define rcu_gp rcu_gp_qsbr #define get_cpu_call_rcu_data get_cpu_call_rcu_data_qsbr #define get_call_rcu_thread get_call_rcu_thread_qsbr diff --git a/urcu/map/urcu.h b/urcu/map/urcu.h index becc6a0..217bff5 100644 --- a/urcu/map/urcu.h +++ b/urcu/map/urcu.h @@ -77,8 +77,7 @@ #define rcu_exit rcu_exit_memb #define synchronize_rcu synchronize_rcu_memb #define rcu_reader rcu_reader_memb -#define rcu_gp_ctr rcu_gp_ctr_memb -#define rcu_gp_futex rcu_gp_futex_memb +#define rcu_gp rcu_gp_memb #define get_cpu_call_rcu_data get_cpu_call_rcu_data_memb #define get_call_rcu_thread get_call_rcu_thread_memb @@ -125,8 +124,7 @@ #define rcu_exit rcu_exit_sig #define synchronize_rcu synchronize_rcu_sig #define rcu_reader rcu_reader_sig -#define rcu_gp_ctr rcu_gp_ctr_sig -#define rcu_gp_futex rcu_gp_futex_sig +#define rcu_gp rcu_gp_sig #define get_cpu_call_rcu_data get_cpu_call_rcu_data_sig #define get_call_rcu_thread get_call_rcu_thread_sig @@ -170,8 +168,7 @@ #define rcu_exit rcu_exit_mb #define synchronize_rcu synchronize_rcu_mb #define rcu_reader rcu_reader_mb -#define rcu_gp_ctr rcu_gp_ctr_mb -#define rcu_gp_futex rcu_gp_futex_mb +#define rcu_gp rcu_gp_mb #define get_cpu_call_rcu_data get_cpu_call_rcu_data_mb #define get_call_rcu_thread get_call_rcu_thread_mb diff --git a/urcu/static/urcu-qsbr.h b/urcu/static/urcu-qsbr.h index ef1f600..690b77d 100644 --- a/urcu/static/urcu-qsbr.h +++ b/urcu/static/urcu-qsbr.h @@ -119,7 +119,7 @@ static inline void rcu_debug_yield_init(void) #define RCU_GP_ONLINE (1UL << 0) #define RCU_GP_CTR (1UL << 1) -struct urcu_gp { +struct rcu_gp { /* * Global quiescent period counter with low-order bits unused. * Using a int rather than a char to eliminate false register @@ -130,7 +130,7 @@ struct urcu_gp { int32_t futex; } __attribute__((aligned(CAA_CACHE_LINE_SIZE))); -extern struct urcu_gp rcu_gp; +extern struct rcu_gp rcu_gp; struct rcu_reader { /* Data used by both reader and synchronize_rcu() */ diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h index bde1459..bee97ee 100644 --- a/urcu/static/urcu.h +++ b/urcu/static/urcu.h @@ -213,7 +213,7 @@ static inline void smp_mb_slave(int group) #define RCU_GP_CTR_PHASE (1UL << (sizeof(unsigned long) << 2)) #define RCU_GP_CTR_NEST_MASK (RCU_GP_CTR_PHASE - 1) -struct urcu_gp { +struct rcu_gp { /* * Global grace period counter. * Contains the current RCU_GP_CTR_PHASE. @@ -226,7 +226,7 @@ struct urcu_gp { int32_t futex; } __attribute__((aligned(CAA_CACHE_LINE_SIZE))); -extern struct urcu_gp rcu_gp; +extern struct rcu_gp rcu_gp; struct rcu_reader { /* Data used by both reader and synchronize_rcu() */