urcu: move private definitions to .c file
[urcu.git] / urcu / static / urcu.h
index 5ba3004ddb17ccef50f69be9925ed8181923d65b..b9933754e26fed2e7ddb823a25a389681d8506a2 100644 (file)
 extern "C" {
 #endif 
 
-/* Default is RCU_MEMBARRIER on linux */
+/* Default is RCU_MEMBARRIER */
 #if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL)
-# ifdef __linux__
-# define RCU_MEMBARRIER
-# else
-# define RCU_MB
-# endif
+#define RCU_MEMBARRIER
+#endif
+
+/*
+ * RCU_MEMBARRIER is only possibly available on Linux. Fallback to RCU_MB
+ * otherwise.
+ */
+#if !defined(__linux__) && defined(RCU_MEMBARRIER)
+#undef RCU_MEMBARRIER
+#define RCU_MB
 #endif
 
 #ifdef RCU_MEMBARRIER
@@ -90,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
@@ -146,7 +139,7 @@ static inline void debug_yield_write(void)
 
 static inline void debug_yield_init(void)
 {
-       rand_yield = time(NULL) ^ pthread_self();
+       rand_yield = time(NULL) ^ (unsigned long) pthread_self();
 }
 #else
 static inline void debug_yield_read(void)
This page took 0.023348 seconds and 4 git commands to generate.