Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Private Attributes | Friends
OVR::Thread Class Reference

#include <OVR_Threads.h>

Inheritance diagram for OVR::Thread:
Inheritance graph
[legend]

List of all members.

Classes

struct  CreateParams

Public Types

typedef int(* ThreadFn )(Thread *pthread, void *h)
enum  ThreadPriority {
  CriticalPriority, HighestPriority, AboveNormalPriority, NormalPriority,
  BelowNormalPriority, LowestPriority, IdlePriority
}
enum  ThreadState { NotRunning = 0, Running = 1, Suspended = 2 }

Public Member Functions

virtual void Exit (int exitCode=0)
int GetExitCode () const
bool GetExitFlag () const
pthread_t GetOSHandle () const
ThreadId GetThreadId () const
ThreadState GetThreadState () const
bool IsFinished () const
bool IsSuspended () const
virtual void OnExit ()
bool Resume ()
virtual int Run ()
void SetExitFlag (bool exitFlag)
virtual void SetThreadName (const char *name)
virtual bool Start (ThreadState initialState=Running)
bool Suspend ()
 Thread (UPInt stackSize=128 *1024, int processor=-1)
 Thread (ThreadFn threadFunction, void *userHandle=0, UPInt stackSize=128 *1024, int processor=-1, ThreadState initialState=NotRunning)
 Thread (const CreateParams &params)
virtual ~Thread ()

Static Public Member Functions

static void OVR_CDECL FinishAllThreads ()
static int GetCPUCount ()
static int GetOSPriority (ThreadPriority)
static bool MSleep (unsigned msecs)
static bool Sleep (unsigned secs)

Public Attributes

ThreadFn ThreadFunction
void * UserHandle

Protected Member Functions

void FinishAndRelease ()
void Init (const CreateParams &params)
int PRun ()
 Thread (const Thread &source)

Protected Attributes

int ExitCode
ThreadPriority Priority
int Processor
UPInt StackSize
AtomicInt< SInt32SuspendCount
AtomicInt< UInt32ThreadFlags
pthread_t ThreadHandle

Static Private Attributes

static pthread_attr_t Attr
static int InitAttr = 0

Friends

void * Thread_PthreadStartFn (void *phandle)

Detailed Description

Definition at line 186 of file OVR_Threads.h.


Member Typedef Documentation

typedef int(* OVR::Thread::ThreadFn)(Thread *pthread, void *h)

Definition at line 196 of file OVR_Threads.h.


Member Enumeration Documentation

Enumerator:
CriticalPriority 
HighestPriority 
AboveNormalPriority 
NormalPriority 
BelowNormalPriority 
LowestPriority 
IdlePriority 

Definition at line 212 of file OVR_Threads.h.

Enumerator:
NotRunning 
Running 
Suspended 

Definition at line 204 of file OVR_Threads.h.


Constructor & Destructor Documentation

OVR::Thread::Thread ( UPInt  stackSize = 128 * 1024,
int  processor = -1 
)

Definition at line 381 of file OVR_ThreadsPthread.cpp.

OVR::Thread::Thread ( Thread::ThreadFn  threadFunction,
void *  userHandle = 0,
UPInt  stackSize = 128 * 1024,
int  processor = -1,
Thread::ThreadState  initialState = NotRunning 
)

Definition at line 390 of file OVR_ThreadsPthread.cpp.

OVR::Thread::Thread ( const CreateParams params) [explicit]

Definition at line 397 of file OVR_ThreadsPthread.cpp.

OVR::Thread::~Thread ( ) [virtual]

Definition at line 420 of file OVR_ThreadsPthread.cpp.

OVR::Thread::Thread ( const Thread source) [inline, protected]

Definition at line 384 of file OVR_Threads.h.


Member Function Documentation

void OVR::Thread::Exit ( int  exitCode = 0) [virtual]

Definition at line 744 of file OVR_ThreadsPthread.cpp.

void OVR::Thread::FinishAllThreads ( ) [static]

Definition at line 550 of file OVR_ThreadsPthread.cpp.

void OVR::Thread::FinishAndRelease ( ) [protected]

Definition at line 446 of file OVR_ThreadsPthread.cpp.

int OVR::Thread::GetCPUCount ( ) [static]

Definition at line 781 of file OVR_ThreadsPthread.cpp.

int OVR::Thread::GetExitCode ( ) const [inline]

Definition at line 311 of file OVR_Threads.h.

bool OVR::Thread::GetExitFlag ( ) const

Definition at line 576 of file OVR_ThreadsPthread.cpp.

pthread_t OVR::Thread::GetOSHandle ( ) const [inline]

Definition at line 316 of file OVR_Threads.h.

Definition at line 652 of file OVR_ThreadsPthread.cpp.

ThreadId OVR::Thread::GetThreadId ( ) const [inline]

Definition at line 322 of file OVR_Threads.h.

Definition at line 602 of file OVR_ThreadsPthread.cpp.

void OVR::Thread::Init ( const CreateParams params) [protected]

Definition at line 402 of file OVR_ThreadsPthread.cpp.

bool OVR::Thread::IsFinished ( ) const

Definition at line 592 of file OVR_ThreadsPthread.cpp.

bool OVR::Thread::IsSuspended ( ) const

Definition at line 597 of file OVR_ThreadsPthread.cpp.

bool OVR::Thread::MSleep ( unsigned  msecs) [static]

Definition at line 774 of file OVR_ThreadsPthread.cpp.

void OVR::Thread::OnExit ( ) [virtual]

Definition at line 440 of file OVR_ThreadsPthread.cpp.

int OVR::Thread::PRun ( ) [protected]

Definition at line 557 of file OVR_ThreadsPthread.cpp.

Definition at line 737 of file OVR_ThreadsPthread.cpp.

int OVR::Thread::Run ( ) [virtual]
void OVR::Thread::SetExitFlag ( bool  exitFlag)

Definition at line 581 of file OVR_ThreadsPthread.cpp.

void OVR::Thread::SetThreadName ( const char *  name) [inline, virtual]

Definition at line 338 of file OVR_Threads.h.

bool OVR::Thread::Sleep ( unsigned  secs) [static]

Definition at line 768 of file OVR_ThreadsPthread.cpp.

bool OVR::Thread::Start ( ThreadState  initialState = Running) [virtual]

Definition at line 672 of file OVR_ThreadsPthread.cpp.

Definition at line 730 of file OVR_ThreadsPthread.cpp.


Friends And Related Function Documentation

void* Thread_PthreadStartFn ( void *  phandle) [friend]

Definition at line 636 of file OVR_ThreadsPthread.cpp.


Member Data Documentation

pthread_attr_t OVR::Thread::Attr [static, private]

Definition at line 349 of file OVR_Threads.h.

int OVR::Thread::ExitCode [protected]

Definition at line 374 of file OVR_Threads.h.

int OVR::Thread::InitAttr = 0 [static, private]

Definition at line 348 of file OVR_Threads.h.

Definition at line 360 of file OVR_Threads.h.

int OVR::Thread::Processor [protected]

Definition at line 359 of file OVR_Threads.h.

Definition at line 356 of file OVR_Threads.h.

Definition at line 355 of file OVR_Threads.h.

Definition at line 354 of file OVR_Threads.h.

Definition at line 199 of file OVR_Threads.h.

pthread_t OVR::Thread::ThreadHandle [protected]

Definition at line 370 of file OVR_Threads.h.

Definition at line 201 of file OVR_Threads.h.


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


oculus_sdk
Author(s):
autogenerated on Mon Oct 6 2014 03:01:20