Fixes to allow building on Power
[urcu.git] / tests / test_urcu_timing.c
index 13c0993570817560b4e45809db9660bf0f09b074..2bccb33e3b03446bcad934c429080fac54ace14d 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <assert.h>
 #include <sys/syscall.h>
+#include <errno.h>
 #include <urcu/arch.h>
 
 #if defined(_syscall0)
@@ -152,8 +153,9 @@ void *thr_writer(void *arg)
                                assert(old->a == 8);
                        }
                        new->a = 8;
-                       old = rcu_publish_content(&test_rcu_pointer, new);
+                       old = rcu_xchg_pointer(&test_rcu_pointer, new);
                        rcu_copy_mutex_unlock();
+                       synchronize_rcu();
                        /* can be done after unlock */
                        if (old) {
                                old->a = 0;
This page took 0.022993 seconds and 4 git commands to generate.