[ltt-dev] [PATCH] urcu-bp: move private definitions to .c file

Mathieu Desnoyers compudj at krystal.dyndns.org
Tue Aug 9 16:41:20 EDT 2011


* Paolo Bonzini (pbonzini at redhat.com) wrote:
> The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
> Move the definition to urcu-bp.c.

Merged, thanks!

Mathieu

> 
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
>  urcu-bp.c             |    5 +++++
>  urcu/static/urcu-bp.h |    5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/urcu-bp.c b/urcu-bp.c
> index 39a6cd0..aed9d4c 100644
> --- a/urcu-bp.c
> +++ b/urcu-bp.c
> @@ -78,6 +78,11 @@ void *mremap(void *old_address, size_t old_size, size_t new_size, int flags)
>  #define RCU_SLEEP_DELAY		1000
>  #define ARENA_INIT_ALLOC	16
>  
> +/*
> + * Active attempts to check for reader Q.S. before calling sleep().
> + */
> +#define RCU_QS_ACTIVE_ATTEMPTS 100
> +
>  void __attribute__((destructor)) rcu_bp_exit(void);
>  
>  static pthread_mutex_t rcu_gp_lock = PTHREAD_MUTEX_INITIALIZER;
> diff --git a/urcu/static/urcu-bp.h b/urcu/static/urcu-bp.h
> index 64c32ea..832ba0f 100644
> --- a/urcu/static/urcu-bp.h
> +++ b/urcu/static/urcu-bp.h
> @@ -51,11 +51,6 @@
>  extern "C" {
>  #endif
>  
> -/*
> - * Active attempts to check for reader Q.S. before calling sleep().
> - */
> -#define RCU_QS_ACTIVE_ATTEMPTS 100
> -
>  #ifdef DEBUG_RCU
>  #define rcu_assert(args...)	assert(args)
>  #else
> -- 
> 1.7.6
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list