X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_hash.c;h=606851baf37ee1b5a84e63b9e8c3cbe3e2a74e48;hb=HEAD;hp=3574b4c3468117cce094344fcb170f390e06d8d1;hpb=014775106c60f02818ca755b331f887030bd440f;p=urcu.git diff --git a/tests/benchmark/test_urcu_hash.c b/tests/benchmark/test_urcu_hash.c index 3574b4c..606851b 100644 --- a/tests/benchmark/test_urcu_hash.c +++ b/tests/benchmark/test_urcu_hash.c @@ -1,23 +1,9 @@ +// SPDX-FileCopyrightText: 2009-2012 Mathieu Desnoyers +// +// SPDX-License-Identifier: GPL-2.0-or-later + /* - * test_urcu_hash.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" @@ -96,8 +82,6 @@ DEFINE_URCU_TLS(unsigned long, lookup_ok); struct cds_lfht *test_ht; -volatile int test_go, test_stop; - unsigned long wdelay; unsigned long duration; @@ -649,14 +633,14 @@ int main(int argc, char **argv) cmm_smp_mb(); - test_go = 1; + begin_test(); remain = duration; do { remain = sleep(remain); } while (remain > 0); - test_stop = 1; + end_test(); end_pthread_join: for (i_thr = 0; i_thr < nr_readers_created; i_thr++) {