X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_hash_unique.c;h=487baa878e698cc01bad314cd34d5b77cb615fe0;hb=9e4e7ad18c86159520b330fab94b93f7ab6d221c;hp=de7c427e4a1c3088b84cacd6232467f75f31fdfa;hpb=70469b43316ecc8d6053550504858ad8a8ef9b16;p=userspace-rcu.git diff --git a/tests/benchmark/test_urcu_hash_unique.c b/tests/benchmark/test_urcu_hash_unique.c index de7c427..487baa8 100644 --- a/tests/benchmark/test_urcu_hash_unique.c +++ b/tests/benchmark/test_urcu_hash_unique.c @@ -1,23 +1,9 @@ +// SPDX-FileCopyrightText: 2009-2012 Mathieu Desnoyers +// +// SPDX-License-Identifier: GPL-2.0-or-later + /* - * test_urcu_hash_unique.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" @@ -71,10 +57,7 @@ void *test_hash_unique_thr_reader(void *_count) rcu_register_thread(); - while (!test_go) - { - } - cmm_smp_mb(); + wait_until_go(); for (;;) { struct lfht_test_node *node; @@ -136,10 +119,7 @@ void *test_hash_unique_thr_writer(void *_count) rcu_register_thread(); - while (!test_go) - { - } - cmm_smp_mb(); + wait_until_go(); for (;;) { /*