Fix: rcutorture should register thread using call_rcu
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Sep 2016 21:26:25 +0000 (17:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 7 Sep 2016 21:54:59 +0000 (17:54 -0400)
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 <mathieu.desnoyers@efficios.com>
tests/regression/rcutorture.h

index f8548d811ed8980061716cc797a63524d97524a4..6539a573d1d4536745f7eefb3d4feca80c15e807 100644 (file)
@@ -344,6 +344,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)
                poll(NULL, 0, 1);
        while (goflag == GOFLAG_RUN) {
@@ -380,6 +383,9 @@ void *rcu_update_stress_test(void *arg)
                }
                n_updates++;
        }
+
+       rcu_thread_online();
+       rcu_unregister_thread();
        return NULL;
 }
 
This page took 0.026236 seconds and 4 git commands to generate.