X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_hash_rw.c;h=b76603e6742db7f702ed38d46cd6c73fac4bfff3;hb=HEAD;hp=862a6f0dc5e55a09528d9e58da81a7a7bfaf2a90;hpb=70469b43316ecc8d6053550504858ad8a8ef9b16;p=urcu.git diff --git a/tests/benchmark/test_urcu_hash_rw.c b/tests/benchmark/test_urcu_hash_rw.c index 862a6f0..b76603e 100644 --- a/tests/benchmark/test_urcu_hash_rw.c +++ b/tests/benchmark/test_urcu_hash_rw.c @@ -1,23 +1,9 @@ +// SPDX-FileCopyrightText: 2009-2012 Mathieu Desnoyers +// +// SPDX-License-Identifier: GPL-2.0-or-later + /* - * test_urcu_hash_rw.c - * * Userspace RCU library - test program - * - * Copyright 2009-2012 - Mathieu Desnoyers - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "test_urcu_hash.h" @@ -73,10 +59,7 @@ void *test_hash_rw_thr_reader(void *_count) rcu_register_thread(); - while (!test_go) - { - } - cmm_smp_mb(); + wait_until_go(); for (;;) { rcu_read_lock(); @@ -133,10 +116,7 @@ void *test_hash_rw_thr_writer(void *_count) rcu_register_thread(); - while (!test_go) - { - } - cmm_smp_mb(); + wait_until_go(); for (;;) { struct cds_lfht_node *ret_node = NULL;