Update email address from @polymtl.ca to @efficios.com
[urcu.git] / tests / test_urcu_timing.c
index 27d973048a757cd7a86d95fbdcb8b71791220cde..94ac0ae4dff32043d45f7bab97d629665d4932aa 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Userspace RCU library - test program
  *
- * Copyright February 2009 - Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+ * Copyright February 2009 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include <stdio.h>
 #include <assert.h>
 #include <sys/syscall.h>
+#include <errno.h>
 #include <urcu/arch.h>
 
-/* Make this big enough to include the POWER5+ L3 cacheline size of 256B */
-#define CACHE_LINE_SIZE 4096
-
 #if defined(_syscall0)
 _syscall0(pid_t, gettid)
 #elif defined(__NR_gettid)
@@ -155,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.024476 seconds and 4 git commands to generate.