X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_qsbr_timing.c;h=b9cfd79382c8848b130644a4c5c776d4612975d3;hb=9d7e3f89772f08cca26d727f47d44ecd47c94401;hp=3585f83470a9ed28120312dd3d4c5fb8e4293b62;hpb=ec4e58a3aba2084440012f8ccac3a31eb6101183;p=urcu.git diff --git a/tests/test_qsbr_timing.c b/tests/test_qsbr_timing.c index 3585f83..b9cfd79 100644 --- a/tests/test_qsbr_timing.c +++ b/tests/test_qsbr_timing.c @@ -30,10 +30,9 @@ #include #include #include -#include +#include -/* Make this big enough to include the POWER5+ L3 cacheline size of 256B */ -#define CACHE_LINE_SIZE 4096 +#include #if defined(_syscall0) _syscall0(pid_t, gettid) @@ -156,8 +155,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;