Bike-X
0.8
|
#include "OVR_Threads.h"
Data Structures | |
struct | CreateParams |
Public Types | |
enum | ThreadState { NotRunning = 0, Running = 1, Suspended = 2 } |
enum | ThreadPriority { CriticalPriority, HighestPriority, AboveNormalPriority, NormalPriority, BelowNormalPriority, LowestPriority, IdlePriority } |
typedef int(* | ThreadFn )(Thread *pthread, void *h) |
Public Member Functions | |
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 ¶ms) | |
virtual | ~Thread () |
virtual int | Run () |
virtual void | OnExit () |
virtual bool | Start (ThreadState initialState=Running) |
virtual void | Exit (int exitCode=0) |
bool | Suspend () |
bool | Resume () |
bool | GetExitFlag () const |
void | SetExitFlag (bool exitFlag) |
bool | IsFinished () const |
bool | IsSuspended () const |
ThreadState | GetThreadState () const |
int | GetExitCode () const |
pthread_t | GetOSHandle () const |
ThreadId | GetThreadId () const |
virtual void | SetThreadName (const char *name) |
Public Member Functions inherited from OVR::RefCountBase< Thread > | |
OVR_FORCE_INLINE | RefCountBase () |
Public Member Functions inherited from OVR::RefCountBaseStatImpl< RefCountImpl > | |
RefCountBaseStatImpl () | |
Public Member Functions inherited from OVR::RefCountImpl | |
void | AddRef () |
void | Release () |
Public Member Functions inherited from OVR::RefCountImplCore | |
OVR_FORCE_INLINE | RefCountImplCore () |
virtual | ~RefCountImplCore () |
int | GetRefCount () const |
void | operator= (const RefCountImplCore &) |
Static Public Member Functions | |
static void OVR_CDECL | FinishAllThreads () |
static int | GetCPUCount () |
static int | GetOSPriority (ThreadPriority) |
static bool | Sleep (unsigned secs) |
static bool | MSleep (unsigned msecs) |
Static Public Member Functions inherited from OVR::RefCountImplCore | |
static void | checkInvalidDelete (RefCountImplCore *) |
Data Fields | |
ThreadFn | ThreadFunction |
void * | UserHandle |
Protected Member Functions | |
int | PRun () |
void | FinishAndRelease () |
void | Init (const CreateParams ¶ms) |
Thread (const Thread &source) | |
Protected Attributes | |
AtomicInt< UInt32 > | ThreadFlags |
AtomicInt< SInt32 > | SuspendCount |
UPInt | StackSize |
int | Processor |
ThreadPriority | Priority |
pthread_t | ThreadHandle |
int | ExitCode |
Protected Attributes inherited from OVR::RefCountImplCore | |
volatile int | RefCount |
Static Private Attributes | |
static int | InitAttr = 0 |
static pthread_attr_t | Attr |
Friends | |
void * | Thread_PthreadStartFn (void *phandle) |
Definition at line 197 of file OVR_Threads.h.
typedef int(* OVR::Thread::ThreadFn)(Thread *pthread, void *h) |
Definition at line 207 of file OVR_Threads.h.
Enumerator | |
---|---|
CriticalPriority | |
HighestPriority | |
AboveNormalPriority | |
NormalPriority | |
BelowNormalPriority | |
LowestPriority | |
IdlePriority |
Definition at line 223 of file OVR_Threads.h.
Enumerator | |
---|---|
NotRunning | |
Running | |
Suspended |
Definition at line 215 of file OVR_Threads.h.
OVR::Thread::Thread | ( | UPInt | stackSize = 128 * 1024 , |
int | processor = -1 |
||
) |
Definition at line 393 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 402 of file OVR_ThreadsPthread.cpp.
|
explicit |
Definition at line 409 of file OVR_ThreadsPthread.cpp.
|
virtual |
Definition at line 432 of file OVR_ThreadsPthread.cpp.
|
inlineprotected |
Definition at line 395 of file OVR_Threads.h.
|
virtual |
Definition at line 743 of file OVR_ThreadsPthread.cpp.
|
static |
Definition at line 562 of file OVR_ThreadsPthread.cpp.
|
protected |
Definition at line 458 of file OVR_ThreadsPthread.cpp.
|
static |
Definition at line 780 of file OVR_ThreadsPthread.cpp.
|
inline |
Definition at line 322 of file OVR_Threads.h.
bool OVR::Thread::GetExitFlag | ( | ) | const |
Definition at line 588 of file OVR_ThreadsPthread.cpp.
|
inline |
Definition at line 327 of file OVR_Threads.h.
|
static |
Definition at line 664 of file OVR_ThreadsPthread.cpp.
|
inline |
Definition at line 333 of file OVR_Threads.h.
Thread::ThreadState OVR::Thread::GetThreadState | ( | ) | const |
Definition at line 614 of file OVR_ThreadsPthread.cpp.
|
protected |
Definition at line 414 of file OVR_ThreadsPthread.cpp.
bool OVR::Thread::IsFinished | ( | ) | const |
Definition at line 604 of file OVR_ThreadsPthread.cpp.
bool OVR::Thread::IsSuspended | ( | ) | const |
Definition at line 609 of file OVR_ThreadsPthread.cpp.
|
static |
Definition at line 773 of file OVR_ThreadsPthread.cpp.
|
virtual |
Definition at line 452 of file OVR_ThreadsPthread.cpp.
|
protected |
Definition at line 569 of file OVR_ThreadsPthread.cpp.
bool OVR::Thread::Resume | ( | ) |
Definition at line 736 of file OVR_ThreadsPthread.cpp.
|
virtual |
Reimplemented in OVR::Linux::DeviceManagerThread.
Definition at line 447 of file OVR_ThreadsPthread.cpp.
void OVR::Thread::SetExitFlag | ( | bool | exitFlag | ) |
Definition at line 593 of file OVR_ThreadsPthread.cpp.
|
inlinevirtual |
Definition at line 349 of file OVR_Threads.h.
|
static |
Definition at line 767 of file OVR_ThreadsPthread.cpp.
|
virtual |
Definition at line 671 of file OVR_ThreadsPthread.cpp.
bool OVR::Thread::Suspend | ( | ) |
Definition at line 729 of file OVR_ThreadsPthread.cpp.
|
friend |
Definition at line 648 of file OVR_ThreadsPthread.cpp.
|
staticprivate |
Definition at line 360 of file OVR_Threads.h.
|
protected |
Definition at line 385 of file OVR_Threads.h.
|
staticprivate |
Definition at line 359 of file OVR_Threads.h.
|
protected |
Definition at line 371 of file OVR_Threads.h.
|
protected |
Definition at line 370 of file OVR_Threads.h.
|
protected |
Definition at line 367 of file OVR_Threads.h.
Definition at line 366 of file OVR_Threads.h.
Definition at line 365 of file OVR_Threads.h.
ThreadFn OVR::Thread::ThreadFunction |
Definition at line 210 of file OVR_Threads.h.
|
protected |
Definition at line 381 of file OVR_Threads.h.
void* OVR::Thread::UserHandle |
Definition at line 212 of file OVR_Threads.h.