X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_timing.c;h=2bccb33e3b03446bcad934c429080fac54ace14d;hb=94b343fd8d68512d78d8646c646c15a1b3f84186;hp=13c0993570817560b4e45809db9660bf0f09b074;hpb=b4e52e3e9e563d38607a8e0ab0aa72e7ab2b47b4;p=urcu.git diff --git a/tests/test_urcu_timing.c b/tests/test_urcu_timing.c index 13c0993..2bccb33 100644 --- a/tests/test_urcu_timing.c +++ b/tests/test_urcu_timing.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #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;