X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Fbenchmark%2Ftest_urcu_lfs_rcu.c;h=7aabc1d3370a1a6acd942b57d757b990b89bd1d9;hb=ce29b37132cef1c1c758e0862ac701e9bb756d29;hp=9d4c5ee6039e1bcacaa5b4d581f1e0943c037d2f;hpb=70469b43316ecc8d6053550504858ad8a8ef9b16;p=urcu.git diff --git a/tests/benchmark/test_urcu_lfs_rcu.c b/tests/benchmark/test_urcu_lfs_rcu.c index 9d4c5ee..7aabc1d 100644 --- a/tests/benchmark/test_urcu_lfs_rcu.c +++ b/tests/benchmark/test_urcu_lfs_rcu.c @@ -1,24 +1,10 @@ +// SPDX-FileCopyrightText: 2010 Mathieu Desnoyers +// SPDX-FileCopyrightText: 2010 Paolo Bonzini +// +// SPDX-License-Identifier: GPL-2.0-or-later + /* - * test_urcu_lfs_rcu.c - * * Userspace RCU library - example RCU-based lock-free stack - * - * Copyright February 2010 - Mathieu Desnoyers - * Copyright February 2010 - Paolo Bonzini - * - * 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 @@ -31,10 +17,10 @@ #include #include #include -#include #include #include +#include #include #include "thread-id.h" @@ -82,7 +68,7 @@ pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER; static void set_affinity(void) { -#if HAVE_SCHED_SETAFFINITY +#ifdef HAVE_SCHED_SETAFFINITY cpu_set_t mask; int cpu, ret; #endif /* HAVE_SCHED_SETAFFINITY */ @@ -90,7 +76,7 @@ static void set_affinity(void) if (!use_affinity) return; -#if HAVE_SCHED_SETAFFINITY +#ifdef HAVE_SCHED_SETAFFINITY ret = pthread_mutex_lock(&affinity_mutex); if (ret) { perror("Error in pthread mutex lock");