X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_qsbr.c;h=f98e2735ef2004b911a78b1def6da07c694ca028;hb=882f335739b978d1c55be2faeed077f315afe5d7;hp=065557a1307d8f3cfe22a6c8ea6b6a39a0b3603e;hpb=171ff3a34ac166a41a075749517fd3780df121da;p=urcu.git diff --git a/tests/test_urcu_qsbr.c b/tests/test_urcu_qsbr.c index 065557a..f98e273 100644 --- a/tests/test_urcu_qsbr.c +++ b/tests/test_urcu_qsbr.c @@ -187,6 +187,11 @@ void *thr_reader(void *_count) rcu_register_thread(); + assert(rcu_read_ongoing()); + rcu_thread_offline(); + assert(!rcu_read_ongoing()); + rcu_thread_online(); + while (!test_go) { } @@ -194,6 +199,7 @@ void *thr_reader(void *_count) for (;;) { rcu_read_lock(); + assert(rcu_read_ongoing()); local_ptr = rcu_dereference(test_rcu_pointer); rcu_debug_yield_read(); if (local_ptr)