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

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


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

Merged, thanks!

Mathieu

> 
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
>  urcu.c             |   12 ++++++++++++
>  urcu/static/urcu.h |   12 ------------
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/urcu.c b/urcu.c
> index 2339bc6..be6d4bd 100644
> --- a/urcu.c
> +++ b/urcu.c
> @@ -41,6 +41,18 @@
>  /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
>  #include "urcu.h"
>  
> +/*
> + * If a reader is really non-cooperative and refuses to commit its
> + * rcu_active_readers count to memory (there is no barrier in the reader
> + * per-se), kick it after a few loops waiting for it.
> + */
> +#define KICK_READER_LOOPS 10000
> +
> +/*
> + * Active attempts to check for reader Q.S. before calling futex().
> + */
> +#define RCU_QS_ACTIVE_ATTEMPTS 100
> +
>  #ifdef RCU_MEMBARRIER
>  static int init_done;
>  int has_sys_membarrier;
> diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h
> index 0295a3e..b993375 100644
> --- a/urcu/static/urcu.h
> +++ b/urcu/static/urcu.h
> @@ -95,18 +95,6 @@ extern "C" {
>  #define SIGRCU SIGUSR1
>  #endif
>  
> -/*
> - * If a reader is really non-cooperative and refuses to commit its
> - * rcu_active_readers count to memory (there is no barrier in the reader
> - * per-se), kick it after a few loops waiting for it.
> - */
> -#define KICK_READER_LOOPS 10000
> -
> -/*
> - * Active attempts to check for reader Q.S. before calling futex().
> - */
> -#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