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

Paolo Bonzini pbonzini at redhat.com
Wed Aug 17 04:31:32 EDT 2011


The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-bp.c.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.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 273acb8..7412b5b 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






More information about the lttng-dev mailing list