X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_timing.c;h=79cd838f56084cd6aae287619206a42d777eab29;hb=40646e1ec30a2fa5d289175643c1d1343e2f9b77;hp=27d973048a757cd7a86d95fbdcb8b71791220cde;hpb=ec4e58a3aba2084440012f8ccac3a31eb6101183;p=urcu.git diff --git a/tests/test_urcu_timing.c b/tests/test_urcu_timing.c index 27d9730..79cd838 100644 --- a/tests/test_urcu_timing.c +++ b/tests/test_urcu_timing.c @@ -32,9 +32,6 @@ #include #include -/* 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 +152,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;