]> git.liburcu.org Git - urcu.git/commitdiff
put thread offline while waiting for the init flag
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Aug 2011 20:49:27 +0000 (16:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 Aug 2011 20:49:27 +0000 (16:49 -0400)
Otherwise, the call_rcu thread might end up in a synchronize_rcu that
never ends.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/rcutorture.h

index 5ba3d2b0e85312318a3e849a1d98c6050faedbf4..4c6f9daa86e7896ac2bf4060308fb85a99da4f83 100644 (file)
@@ -127,9 +127,10 @@ void *rcu_read_perf_test(void *arg)
        rcu_register_thread();
        run_on(me);
        uatomic_inc(&nthreadsrunning);
+       put_thread_offline();
        while (goflag == GOFLAG_INIT)
                poll(NULL, 0, 1);
-       mark_rcu_quiescent_state();
+       put_thread_online();
        while (goflag == GOFLAG_RUN) {
                for (i = 0; i < RCU_READ_RUN; i++) {
                        rcu_read_lock();
@@ -286,9 +287,10 @@ void *rcu_read_stress_test(void *arg)
        int pc;
 
        rcu_register_thread();
+       put_thread_offline();
        while (goflag == GOFLAG_INIT)
                poll(NULL, 0, 1);
-       mark_rcu_quiescent_state();
+       put_thread_online();
        while (goflag == GOFLAG_RUN) {
                rcu_read_lock();
                p = rcu_dereference(rcu_stress_current);
This page took 0.029959 seconds and 4 git commands to generate.