UT_Thread Class Reference

#include <UT_Thread.h>

Inheritance diagram for UT_Thread:

UT_NullThread

List of all members.

Public Types

enum  { ThreadIdle, ThreadRunning }
enum  { ThreadSingleRun, ThreadLowUsage, ThreadWakeFast }

Public Member Functions

virtual ~UT_Thread ()
virtual bool startThread (UTthreadFunc func, void *data)=0
virtual void threadStarted ()
virtual void threadEnded ()
virtual int isResourceHog () const
virtual int getState ()
virtual int getSpinMode ()
virtual void waitForState (int desired)
virtual void setSpinMode (int spin_mode)
virtual void killThread ()=0
virtual int niceThread (int priority)=0
virtual int suspendThread ()=0
virtual int restartThread ()=0
int isActive ()

Static Public Member Functions

static UT_ThreadallocThread (int spin_mode)
static int getNumProcessors ()
static void resetNumProcessors ()
static ut_thread_id_t getMyThreadId ()
static ut_thread_id_t getMainThreadId ()
static int getMainSequentialThreadId ()
static int isMainThread ()
static int getMySequentialThreadIndex ()
static void configureMaxThreads (int maxthreads=-1, int stacksize=-1)
static void interval (int count, int thisSection, int numSections, int &start, int &len)

Protected Member Functions

virtual int waitThread (int block=1)=0
virtual int isValid ()
void killIdle ()
virtual void setState (int state)
 UT_Thread (int spin_mode)

Static Protected Member Functions

static void * threadWrapper (void *data)
static void initializeSequentialThreadIndex ()

Protected Attributes

volatile int myState
int mySpinMode
UTthreadFunc myCallback
void * myCBData


Detailed Description

Definition at line 54 of file UT_Thread.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
ThreadIdle 
ThreadRunning 

Definition at line 63 of file UT_Thread.h.

anonymous enum

Enumerator:
ThreadSingleRun 
ThreadLowUsage 
ThreadWakeFast 

Definition at line 75 of file UT_Thread.h.


Constructor & Destructor Documentation

virtual UT_Thread::~UT_Thread (  )  [virtual]

UT_Thread::UT_Thread ( int  spin_mode  )  [protected]


Member Function Documentation

static UT_Thread* UT_Thread::allocThread ( int  spin_mode  )  [static]

static void UT_Thread::configureMaxThreads ( int  maxthreads = -1,
int  stacksize = -1 
) [static]

static int UT_Thread::getMainSequentialThreadId (  )  [static]

static ut_thread_id_t UT_Thread::getMainThreadId (  )  [static]

static int UT_Thread::getMySequentialThreadIndex (  )  [static]

static ut_thread_id_t UT_Thread::getMyThreadId (  )  [static]

Examples:
VEX/VEX_Ops.C.

static int UT_Thread::getNumProcessors (  )  [static]

virtual int UT_Thread::getSpinMode (  )  [virtual]

virtual int UT_Thread::getState (  )  [virtual]

static void UT_Thread::initializeSequentialThreadIndex (  )  [static, protected]

static void UT_Thread::interval ( int  count,
int  thisSection,
int  numSections,
int &  start,
int &  len 
) [inline, static]

Definition at line 158 of file UT_Thread.h.

int UT_Thread::isActive (  )  [inline]

Definition at line 155 of file UT_Thread.h.

static int UT_Thread::isMainThread (  )  [inline, static]

Definition at line 99 of file UT_Thread.h.

virtual int UT_Thread::isResourceHog (  )  const [virtual]

virtual int UT_Thread::isValid (  )  [protected, virtual]

void UT_Thread::killIdle (  )  [protected]

virtual void UT_Thread::killThread (  )  [pure virtual]

Implemented in UT_NullThread.

virtual int UT_Thread::niceThread ( int  priority  )  [pure virtual]

Implemented in UT_NullThread.

static void UT_Thread::resetNumProcessors (  )  [static]

virtual int UT_Thread::restartThread (  )  [pure virtual]

Implemented in UT_NullThread.

virtual void UT_Thread::setSpinMode ( int  spin_mode  )  [virtual]

virtual void UT_Thread::setState ( int  state  )  [protected, virtual]

virtual bool UT_Thread::startThread ( UTthreadFunc  func,
void *  data 
) [pure virtual]

Implemented in UT_NullThread.

virtual int UT_Thread::suspendThread (  )  [pure virtual]

Implemented in UT_NullThread.

virtual void UT_Thread::threadEnded (  )  [virtual]

virtual void UT_Thread::threadStarted (  )  [virtual]

static void* UT_Thread::threadWrapper ( void *  data  )  [static, protected]

virtual void UT_Thread::waitForState ( int  desired  )  [virtual]

virtual int UT_Thread::waitThread ( int  block = 1  )  [protected, pure virtual]

Implemented in UT_NullThread.


Member Data Documentation

Definition at line 186 of file UT_Thread.h.

void* UT_Thread::myCBData [protected]

Definition at line 187 of file UT_Thread.h.

int UT_Thread::mySpinMode [protected]

Definition at line 185 of file UT_Thread.h.

volatile int UT_Thread::myState [protected]

Definition at line 184 of file UT_Thread.h.


The documentation for this class was generated from the following file:

Generated on Fri May 25 00:10:55 2012 for HDK by  doxygen 1.5.9