X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_qsbr_timing.c;h=69193bff72dbea41cde65f528dcad9372bead384;hp=bbe983e8da53efba99733c94deb59466157f72b6;hb=6982d6d71aeed16d2d929bd0ed221e8f444b706e;hpb=b4e52e3e9e563d38607a8e0ab0aa72e7ab2b47b4 diff --git a/tests/test_qsbr_timing.c b/tests/test_qsbr_timing.c index bbe983e..69193bf 100644 --- a/tests/test_qsbr_timing.c +++ b/tests/test_qsbr_timing.c @@ -3,7 +3,7 @@ * * Userspace QSBR - test program * - * Copyright February 2009 - Mathieu Desnoyers + * Copyright February 2009 - Mathieu Desnoyers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,6 +30,8 @@ #include #include #include +#include + #include #if defined(_syscall0) @@ -153,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;