[ltt-dev] [PATCH] urcu-qsbr: move private definitions to .c file
Mathieu Desnoyers
compudj at krystal.dyndns.org
Tue Aug 9 16:40:47 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-qsbr.c. Also remove KICK_READER_LOOPS.
merged, thanks!
Mathieu
>
> Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
> ---
> urcu-qsbr.c | 5 +++++
> urcu/static/urcu-qsbr.h | 12 ------------
> 2 files changed, 5 insertions(+), 12 deletions(-)
>
> diff --git a/urcu-qsbr.c b/urcu-qsbr.c
> index f89af4b..f246da4 100644
> --- a/urcu-qsbr.c
> +++ b/urcu-qsbr.c
> @@ -53,6 +53,11 @@ int32_t gp_futex;
> unsigned long rcu_gp_ctr = RCU_GP_ONLINE;
>
> /*
> + * Active attempts to check for reader Q.S. before calling futex().
> + */
> +#define RCU_QS_ACTIVE_ATTEMPTS 100
> +
> +/*
> * Written to only by each individual reader. Read by both the reader and the
> * writers.
> */
> diff --git a/urcu/static/urcu-qsbr.h b/urcu/static/urcu-qsbr.h
> index 2ae28b1..b2c5fbf 100644
> --- a/urcu/static/urcu-qsbr.h
> +++ b/urcu/static/urcu-qsbr.h
> @@ -55,18 +55,6 @@ extern "C" {
> * This is required to permit relinking with newer versions of the library.
> */
>
> -/*
> - * If a reader is really non-cooperative and refuses to commit its
> - * rcu_reader.ctr 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