diff options
Diffstat (limited to 'tests/test-rcu-list.c')
-rw-r--r-- | tests/test-rcu-list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c index 4c5f62e996..daa8bf41db 100644 --- a/tests/test-rcu-list.c +++ b/tests/test-rcu-list.c @@ -108,6 +108,8 @@ static void *rcu_q_reader(void *arg) long long n_reads_local = 0; struct list_element *el; + rcu_register_thread(); + *(struct rcu_reader_data **)arg = &rcu_reader; atomic_inc(&nthreadsrunning); while (goflag == GOFLAG_INIT) { @@ -129,6 +131,8 @@ static void *rcu_q_reader(void *arg) qemu_mutex_lock(&counts_mutex); n_reads += n_reads_local; qemu_mutex_unlock(&counts_mutex); + + rcu_unregister_thread(); return NULL; } |