From 490b35133017b65a93b190193c940a66a8228732 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 6 May 2014 16:38:57 +0000 Subject: [PATCH] Replaced obsolete __linux usage. --- src/OpenThreads/pthreads/PThread.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/OpenThreads/pthreads/PThread.cpp b/src/OpenThreads/pthreads/PThread.cpp index 9858877da..c72864c52 100644 --- a/src/OpenThreads/pthreads/PThread.cpp +++ b/src/OpenThreads/pthreads/PThread.cpp @@ -1,13 +1,13 @@ /* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. - * + * * This library 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ @@ -23,7 +23,7 @@ #include #include -#if defined __linux || defined __sun || defined __APPLE__ || ANDROID +#if defined __linux__ || defined __sun || defined __APPLE__ || ANDROID #include #include #include @@ -459,7 +459,7 @@ Thread::~Thread() } delete pd; - + _prvData = 0; } @@ -573,7 +573,7 @@ int Thread::setProcessorAffinity(unsigned int cpunum) PThreadPrivateData *pd = static_cast (_prvData); pd->cpunum = cpunum; if (pd->cpunum<0) return -1; - + #ifdef __sgi int status; @@ -715,7 +715,7 @@ int Thread::start() { // int Thread::startThread() { - if (_prvData) return start(); + if (_prvData) return start(); else return 0; } @@ -1032,7 +1032,7 @@ int OpenThreads::GetNumberOfProcessors() uint64_t num_cpus = 0; size_t num_cpus_length = sizeof(num_cpus); #if defined(__FreeBSD__) - sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0); + sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0); #else sysctlbyname("hw.activecpu", &num_cpus, &num_cpus_length, NULL, 0); #endif @@ -1047,7 +1047,7 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum) Thread::Init(); Thread* thread = Thread::CurrentThread(); - if (thread) + if (thread) { return thread->setProcessorAffinity(cpunum); } @@ -1069,6 +1069,6 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum) #endif #endif } - + return -1; }