From: Mathieu Desnoyers Date: Wed, 7 Sep 2016 21:26:25 +0000 (-0400) Subject: Fix: rcutorture should register thread using call_rcu X-Git-Tag: v0.9.3~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fcb81146d096d63d39adde4f790465a5c52999bb;p=userspace-rcu.git Fix: rcutorture should register thread using call_rcu From rcu-api.txt: `call_rcu` should be called from registered RCU read-side threads. For the QSBR flavor, the caller should be online. Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/regression/rcutorture.h b/tests/regression/rcutorture.h index bf20e56..053653f 100644 --- a/tests/regression/rcutorture.h +++ b/tests/regression/rcutorture.h @@ -368,6 +368,9 @@ void *rcu_update_stress_test(void *arg) struct rcu_stress *p; struct rcu_head rh; + rcu_register_thread(); + rcu_thread_offline(); + while (goflag == GOFLAG_INIT) (void) poll(NULL, 0, 1); while (goflag == GOFLAG_RUN) { @@ -415,6 +418,9 @@ void *rcu_update_stress_test(void *arg) } n_updates++; } + + rcu_thread_online(); + rcu_unregister_thread(); return NULL; }