X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fbenchmark%2Ftest_looplen.c;h=76430a323e46a7b4dac5cc4162dad9c8e50fe7d7;hb=HEAD;hp=c8b5a0256abebc7f14b546040ba2d7259eda6a4f;hpb=3fa182868e25068413fdaa1bef290365e99ab246;p=urcu.git diff --git a/tests/benchmark/test_looplen.c b/tests/benchmark/test_looplen.c index c8b5a02..b743828 100644 --- a/tests/benchmark/test_looplen.c +++ b/tests/benchmark/test_looplen.c @@ -1,26 +1,11 @@ +// SPDX-FileCopyrightText: 2009 Mathieu Desnoyers +// +// SPDX-License-Identifier: GPL-2.0-or-later + /* - * test_looplen.c - * * Userspace RCU library - test program - * - * Copyright February 2009 - 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. */ -#define _GNU_SOURCE #include #include #include @@ -29,11 +14,11 @@ #include #include #include -#include #include #include #include +#include #ifndef DYNAMIC_LINK_TEST #define _LGPL_SOURCE @@ -51,7 +36,7 @@ static inline void loop_sleep(unsigned long loops) #define LOOPS 1048576 #define TESTS 10 -int main(int argc, char **argv) +int main(void) { unsigned long i; caa_cycles_t time1, time2; @@ -68,7 +53,7 @@ int main(int argc, char **argv) printf("CALIBRATION : %g cycles per loop\n", cpl); printf("time_tot = %llu, LOOPS = %d, TESTS = %d\n", - time_tot, LOOPS, TESTS); + (unsigned long long) time_tot, LOOPS, TESTS); return 0; }