Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
//
|
||||
// Barrier - C++ barrier class
|
||||
// ~~~~~~~
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef _OPENTHREADS_BARRIER_
|
||||
#define _OPENTHREADS_BARRIER_
|
||||
@@ -66,12 +66,12 @@ public:
|
||||
/**
|
||||
* Return the number of threads currently blocked in the barrier,
|
||||
* Return -1 if error.
|
||||
*/
|
||||
*/
|
||||
virtual int numThreadsCurrentlyBlocked();
|
||||
|
||||
|
||||
void invalidate();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
namespace OpenThreads {
|
||||
|
||||
/** Block is a block that can be used to halt a thread that is waiting another thread to release it.*/
|
||||
class Block
|
||||
class Block
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
Block():
|
||||
_released(false) {}
|
||||
|
||||
@@ -75,7 +75,7 @@ class Block
|
||||
ScopedLock<OpenThreads::Mutex> mutlock(_mut);
|
||||
_released = false;
|
||||
}
|
||||
|
||||
|
||||
inline void set(bool doRelease)
|
||||
{
|
||||
if (doRelease!=_released)
|
||||
@@ -97,10 +97,10 @@ class Block
|
||||
};
|
||||
|
||||
/** BlockCount is a block that can be used to halt a thread that is waiting for a specified number of operations to be completed.*/
|
||||
class BlockCount
|
||||
class BlockCount
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
BlockCount(unsigned int blockCount):
|
||||
_blockCount(blockCount),
|
||||
_currentCount(0) {}
|
||||
@@ -132,7 +132,7 @@ class BlockCount
|
||||
if (_currentCount)
|
||||
_cond.wait(&_mut);
|
||||
}
|
||||
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> mutlock(_mut);
|
||||
@@ -154,9 +154,9 @@ class BlockCount
|
||||
}
|
||||
|
||||
inline void setBlockCount(unsigned int blockCount) { _blockCount = blockCount; }
|
||||
|
||||
|
||||
inline unsigned int getBlockCount() const { return _blockCount; }
|
||||
|
||||
|
||||
inline unsigned int getCurrentCount() const { return _currentCount; }
|
||||
|
||||
protected:
|
||||
@@ -167,7 +167,7 @@ class BlockCount
|
||||
unsigned int _currentCount;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
BlockCount(const BlockCount&) {}
|
||||
|
||||
};
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
#define OPENTHREAD_EXPORT_DIRECTIVE __declspec(dllexport)
|
||||
#else
|
||||
#define OPENTHREAD_EXPORT_DIRECTIVE __declspec(dllimport)
|
||||
|
||||
|
||||
#if 0 // Commented out for now
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib ,"OpenThreadsWin32d")
|
||||
#else
|
||||
#else
|
||||
#pragma comment(lib, "OpenThreadsWin32")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield
|
||||
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -22,12 +22,12 @@ namespace OpenThreads {
|
||||
class ReadWriteMutex
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ReadWriteMutex():
|
||||
_readCount(0) {}
|
||||
|
||||
|
||||
virtual ~ReadWriteMutex() {}
|
||||
|
||||
|
||||
virtual int readLock()
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_readCountMutex);
|
||||
@@ -65,31 +65,31 @@ class ReadWriteMutex
|
||||
{
|
||||
return _readWriteMutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
ReadWriteMutex(const ReadWriteMutex&) {}
|
||||
ReadWriteMutex& operator = (const ReadWriteMutex&) { return *(this); }
|
||||
|
||||
#if 0
|
||||
ReentrantMutex _readWriteMutex;
|
||||
ReentrantMutex _readWriteMutex;
|
||||
ReentrantMutex _readCountMutex;
|
||||
#else
|
||||
OpenThreads::Mutex _readWriteMutex;
|
||||
OpenThreads::Mutex _readWriteMutex;
|
||||
OpenThreads::Mutex _readCountMutex;
|
||||
#endif
|
||||
#endif
|
||||
unsigned int _readCount;
|
||||
|
||||
|
||||
};
|
||||
|
||||
class ScopedReadLock
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ScopedReadLock(ReadWriteMutex& mutex):_mutex(mutex) { _mutex.readLock(); }
|
||||
~ScopedReadLock() { _mutex.readUnlock(); }
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
ReadWriteMutex& _mutex;
|
||||
|
||||
ScopedReadLock& operator = (const ScopedReadLock&) { return *this; }
|
||||
@@ -99,11 +99,11 @@ class ScopedReadLock
|
||||
class ScopedWriteLock
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ScopedWriteLock(ReadWriteMutex& mutex):_mutex(mutex) { _mutex.writeLock(); }
|
||||
~ScopedWriteLock() { _mutex.writeUnlock(); }
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
ReadWriteMutex& _mutex;
|
||||
|
||||
ScopedWriteLock& operator = (const ScopedWriteLock&) { return *this; }
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield
|
||||
/* -*-c++-*- OpenThreads - Copyright (C) 1998-2007 Robert Osfield
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
//
|
||||
// ScopedLock and ReverseScopedLock templates
|
||||
// ~~~~~~~
|
||||
//
|
||||
//
|
||||
#ifndef _ScopedLock_
|
||||
#define _ScopedLock_
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenThreads {
|
||||
/**
|
||||
* Get the number of processors.
|
||||
*
|
||||
* Note, systems where no support exists for querrying the number of processors, 1 is returned.
|
||||
* Note, systems where no support exists for querrying the number of processors, 1 is returned.
|
||||
*
|
||||
*/
|
||||
extern OPENTHREAD_EXPORT_DIRECTIVE int GetNumberOfProcessors();
|
||||
@@ -37,7 +37,7 @@ extern OPENTHREAD_EXPORT_DIRECTIVE int GetNumberOfProcessors();
|
||||
/**
|
||||
* Set the processor affinity of current thread.
|
||||
*
|
||||
* Note, systems where no support exists no affinity will be set, and -1 will be returned.
|
||||
* Note, systems where no support exists no affinity will be set, and -1 will be returned.
|
||||
*
|
||||
*/
|
||||
extern OPENTHREAD_EXPORT_DIRECTIVE int SetProcessorAffinityOfCurrentThread(unsigned int cpunum);
|
||||
@@ -372,7 +372,7 @@ private:
|
||||
* Implementation-specific data
|
||||
*/
|
||||
void * _prvData;
|
||||
|
||||
|
||||
/**
|
||||
* Master thread's priority, set by Thread::Init.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user