Add test for rcu_assign_pointer()
[urcu.git] / urcu-static.h
index f2a463c47ab9dd03eff61c84d90c6c0d5edf6f3b..7d6d7ac25fbd915e8191f7ece2cad27eddbb9251 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <urcu/compiler.h>
 #include <urcu/arch.h>
+#include <urcu/arch_uatomic.h>
 #include <urcu/list.h>
 
 /*
@@ -220,10 +221,12 @@ static inline void reader_barrier()
 extern long urcu_gp_ctr;
 
 struct urcu_reader {
+       /* Data used by both reader and synchronize_rcu() */
        long ctr;
-       struct list_head head;
-       pthread_t tid;
        char need_mb;
+       /* Data used for registry */
+       struct list_head head __attribute__((aligned(CACHE_LINE_SIZE)));
+       pthread_t tid;
 };
 
 extern struct urcu_reader __thread urcu_reader;
This page took 0.022622 seconds and 4 git commands to generate.