openscenegraph
Classes | Functions
OpenThreads Namespace Reference

Classes

class  Affinity
 Simple container for specifying which CPU a thread should have affinity with. An empty Affinity.activeCPUs/default constructed Affinity signifies that a thread should not have any specific affinity and be able to run on all available CPUs. More...
 
class  Atomic
 This class provides an atomic increment and decrement operation. More...
 
class  AtomicPtr
 This class provides an atomic pointer assignment using cas operations. More...
 
class  Barrier
 This class provides an object-oriented thread barrier interface. More...
 
class  Block
 
class  BlockCount
 
class  Condition
 This class provides an object-oriented thread condition interface. More...
 
class  Mutex
 This class provides an object-oriented thread mutex interface. More...
 
class  ReadWriteMutex
 
class  ReentrantMutex
 
class  ReverseScopedLock
 
class  ReverseScopedPointerLock
 
class  ScopedLock
 
class  ScopedPointerLock
 
class  ScopedReadLock
 
class  ScopedWriteLock
 
class  Thread
 This class provides an object-oriented thread interface. More...
 

Functions

OPENTHREAD_EXPORT_DIRECTIVE int GetNumberOfProcessors ()
 
OPENTHREAD_EXPORT_DIRECTIVE int SetProcessorAffinityOfCurrentThread (const Affinity &affinity)
 

Function Documentation

◆ GetNumberOfProcessors()

OPENTHREAD_EXPORT_DIRECTIVE int OpenThreads::GetNumberOfProcessors ( )
extern

Get the number of processors.

Note, systems where no support exists for querying the number of processors, 1 is returned.

◆ SetProcessorAffinityOfCurrentThread()

OPENTHREAD_EXPORT_DIRECTIVE int OpenThreads::SetProcessorAffinityOfCurrentThread ( const Affinity affinity)
extern

Set the processor affinity of current thread.