X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_qsbr.c;fp=tests%2Ftest_qsbr.c;h=d6c4d1aed017420666da1ad68562542f151b6d80;hp=6230510ab39688d9ba8524e6aadc9bc721470883;hb=d2835e6f55477acf4833d6a9774f672288a99075;hpb=3cd243cb6aadf35b82c35279d7179ead1e9cc938 diff --git a/tests/test_qsbr.c b/tests/test_qsbr.c index 6230510..d6c4d1a 100644 --- a/tests/test_qsbr.c +++ b/tests/test_qsbr.c @@ -259,7 +259,8 @@ void *thr_writer(void *_count) for (;;) { new = test_array_alloc(); new->a = 8; - old = rcu_publish_content(&test_rcu_pointer, new); + old = rcu_xchg_pointer(&test_rcu_pointer, new); + synchronize_rcu(); /* can be done after unlock */ if (old) old->a = 0;