X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_qsbr.c;h=5284a4837bc9fdd0e69e28db4bbec6774ae0e67a;hp=6230510ab39688d9ba8524e6aadc9bc721470883;hb=94b343fd8d68512d78d8646c646c15a1b3f84186;hpb=b4e52e3e9e563d38607a8e0ab0aa72e7ab2b47b4 diff --git a/tests/test_qsbr.c b/tests/test_qsbr.c index 6230510..5284a48 100644 --- a/tests/test_qsbr.c +++ b/tests/test_qsbr.c @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -259,7 +260,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;