From David Callu, warning fixes and removal of spaces at end of lines.

This commit is contained in:
Robert Osfield
2013-06-28 12:00:43 +00:00
parent d82768417d
commit 097aedf23c
100 changed files with 496 additions and 428 deletions

View File

@@ -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.
*/
@@ -238,7 +238,8 @@ private:
}
fflush(stdout);
#else // ] ALLOW_PRIORITY_SCHEDULING
OT_UNUSED(thread);
#endif // ] ALLOW_PRIORITY_SCHEDULING
}
@@ -346,6 +347,8 @@ private:
}
#else // ] ALLOW_PRIORITY_SCHEDULING
OT_UNUSED(thread);
#endif // ] ALLOW_PRIORITY_SCHEDULING
return status;
@@ -366,6 +369,7 @@ int Thread::SetConcurrency(int concurrencyLevel)
#if defined (HAVE_PTHREAD_SETCONCURRENCY)
return pthread_setconcurrency(concurrencyLevel);
#else
OT_UNUSED(concurrencyLevel);
return -1;
#endif
@@ -436,7 +440,7 @@ Thread::~Thread()
}
delete pd;
_prvData = 0;
}
@@ -550,7 +554,7 @@ int Thread::setProcessorAffinity(unsigned int cpunum)
PThreadPrivateData *pd = static_cast<PThreadPrivateData *> (_prvData);
pd->cpunum = cpunum;
if (pd->cpunum<0) return -1;
#ifdef __sgi
int status;
@@ -692,7 +696,7 @@ int Thread::start() {
//
int Thread::startThread()
{
if (_prvData) return start();
if (_prvData) return start();
else return 0;
}
@@ -839,6 +843,7 @@ int Thread::setSchedulePriority(ThreadPriority priority) {
return 0;
#else
OT_UNUSED(priority);
return -1;
#endif
@@ -878,6 +883,7 @@ int Thread::setSchedulePolicy(ThreadPolicy policy)
else
return 0;
#else
OT_UNUSED(policy);
return -1;
#endif
@@ -1009,7 +1015,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
@@ -1024,7 +1030,7 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
Thread::Init();
Thread* thread = Thread::CurrentThread();
if (thread)
if (thread)
{
return thread->setProcessorAffinity(cpunum);
}
@@ -1046,6 +1052,6 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
#endif
#endif
}
return -1;
}