Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::Linux::DeviceManagerThread Class Reference

#include "OVR_Linux_DeviceManager.h"

Inheritance diagram for OVR::Linux::DeviceManagerThread:
Inheritance graph
Collaboration diagram for OVR::Linux::DeviceManagerThread:
Collaboration graph

Data Structures

class  Notifier
 

Public Member Functions

 DeviceManagerThread ()
 
 ~DeviceManagerThread ()
 
virtual int Run ()
 
virtual void OnPushNonEmpty_Locked ()
 
virtual void OnPopEmpty_Locked ()
 
bool AddSelectFd (Notifier *notify, int fd)
 
bool RemoveSelectFd (Notifier *notify, int fd)
 
bool AddTicksNotifier (Notifier *notify)
 
bool RemoveTicksNotifier (Notifier *notify)
 
- Public Member Functions inherited from OVR::Thread
 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 ()
 
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 &)
 
- Public Member Functions inherited from OVR::ThreadCommandQueue
 ThreadCommandQueue ()
 
virtual ~ThreadCommandQueue ()
 
bool PopCommand (ThreadCommand::PopBuffer *popBuffer)
 
bool PushCommand (const ThreadCommand &command)
 
void PushExitCommand (bool wait)
 
bool IsExiting () const
 
template<class C , class R >
bool PushCall (R(C::*fn)(), bool wait=false)
 
template<class C , class R , class A0 >
bool PushCall (R(C::*fn)(A0), typename SelfType< A0 >::Type a0, bool wait=false)
 
template<class C , class R , class A0 , class A1 >
bool PushCall (R(C::*fn)(A0, A1), typename SelfType< A0 >::Type a0, typename SelfType< A1 >::Type a1, bool wait=false)
 
template<class C , class R >
bool PushCall (C *p, R(C::*fn)(), bool wait=false)
 
template<class C , class R , class A0 >
bool PushCall (C *p, R(C::*fn)(A0), typename SelfType< A0 >::Type a0, bool wait=false)
 
template<class C , class R , class A0 , class A1 >
bool PushCall (C *p, R(C::*fn)(A0, A1), typename SelfType< A0 >::Type a0, typename SelfType< A1 >::Type a1, bool wait=false)
 
template<class C , class R >
bool PushCallAndWaitResult (R(C::*fn)(), R *ret)
 
template<class C , class R , class A0 >
bool PushCallAndWaitResult (R(C::*fn)(A0), R *ret, typename SelfType< A0 >::Type a0)
 
template<class C , class R , class A0 , class A1 >
bool PushCallAndWaitResult (R(C::*fn)(A0, A1), R *ret, typename SelfType< A0 >::Type a0, typename SelfType< A1 >::Type a1)
 
template<class C , class R >
bool PushCallAndWaitResult (C *p, R(C::*fn)(), R *ret)
 
template<class C , class R , class A0 >
bool PushCallAndWaitResult (C *p, R(C::*fn)(A0), R *ret, typename SelfType< A0 >::Type a0)
 
template<class C , class R , class A0 , class A1 >
bool PushCallAndWaitResult (C *p, R(C::*fn)(A0, A1), R *ret, typename SelfType< A0 >::Type a0, typename SelfType< A1 >::Type a1)
 

Private Types

enum  { ThreadStackSize = 64 * 1024 }
 

Private Member Functions

bool threadInitialized ()
 

Private Attributes

int CommandFd [2]
 
Array< struct pollfd > PollFds
 
Array< Notifier * > FdNotifiers
 
Event StartupEvent
 
Array< Notifier * > TicksNotifiers
 

Friends

class DeviceManager
 

Additional Inherited Members

- Public Types inherited from OVR::Thread
enum  ThreadState { NotRunning = 0, Running = 1, Suspended = 2 }
 
enum  ThreadPriority {
  CriticalPriority, HighestPriority, AboveNormalPriority, NormalPriority,
  BelowNormalPriority, LowestPriority, IdlePriority
}
 
typedef int(* ThreadFn )(Thread *pthread, void *h)
 
- Static Public Member Functions inherited from OVR::Thread
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 inherited from OVR::Thread
ThreadFn ThreadFunction
 
void * UserHandle
 
- Protected Member Functions inherited from OVR::Thread
int PRun ()
 
void FinishAndRelease ()
 
void Init (const CreateParams &params)
 
 Thread (const Thread &source)
 
- Protected Attributes inherited from OVR::Thread
AtomicInt< UInt32ThreadFlags
 
AtomicInt< SInt32SuspendCount
 
UPInt StackSize
 
int Processor
 
ThreadPriority Priority
 
pthread_t ThreadHandle
 
int ExitCode
 
- Protected Attributes inherited from OVR::RefCountImplCore
volatile int RefCount
 

Detailed Description

Definition at line 66 of file OVR_Linux_DeviceManager.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
ThreadStackSize 

Definition at line 69 of file OVR_Linux_DeviceManager.h.

Constructor & Destructor Documentation

OVR::Linux::DeviceManagerThread::DeviceManagerThread ( )

Definition at line 132 of file OVR_Linux_DeviceManager.cpp.

OVR::Linux::DeviceManagerThread::~DeviceManagerThread ( )

Definition at line 142 of file OVR_Linux_DeviceManager.cpp.

Member Function Documentation

bool OVR::Linux::DeviceManagerThread::AddSelectFd ( Notifier notify,
int  fd 
)

Definition at line 152 of file OVR_Linux_DeviceManager.cpp.

bool OVR::Linux::DeviceManagerThread::AddTicksNotifier ( Notifier notify)

Definition at line 270 of file OVR_Linux_DeviceManager.cpp.

virtual void OVR::Linux::DeviceManagerThread::OnPopEmpty_Locked ( )
inlinevirtual

Reimplemented from OVR::ThreadCommandQueue.

Definition at line 78 of file OVR_Linux_DeviceManager.h.

virtual void OVR::Linux::DeviceManagerThread::OnPushNonEmpty_Locked ( )
inlinevirtual

Reimplemented from OVR::ThreadCommandQueue.

Definition at line 77 of file OVR_Linux_DeviceManager.h.

bool OVR::Linux::DeviceManagerThread::RemoveSelectFd ( Notifier notify,
int  fd 
)

Definition at line 166 of file OVR_Linux_DeviceManager.cpp.

bool OVR::Linux::DeviceManagerThread::RemoveTicksNotifier ( Notifier notify)

Definition at line 276 of file OVR_Linux_DeviceManager.cpp.

int OVR::Linux::DeviceManagerThread::Run ( )
virtual

Reimplemented from OVR::Thread.

Definition at line 184 of file OVR_Linux_DeviceManager.cpp.

bool OVR::Linux::DeviceManagerThread::threadInitialized ( )
inlineprivate

Definition at line 106 of file OVR_Linux_DeviceManager.h.

Friends And Related Function Documentation

friend class DeviceManager
friend

Definition at line 68 of file OVR_Linux_DeviceManager.h.

Field Documentation

int OVR::Linux::DeviceManagerThread::CommandFd[2]
private

Definition at line 109 of file OVR_Linux_DeviceManager.h.

Array<Notifier*> OVR::Linux::DeviceManagerThread::FdNotifiers
private

Definition at line 112 of file OVR_Linux_DeviceManager.h.

Array<struct pollfd> OVR::Linux::DeviceManagerThread::PollFds
private

Definition at line 111 of file OVR_Linux_DeviceManager.h.

Event OVR::Linux::DeviceManagerThread::StartupEvent
private

Definition at line 114 of file OVR_Linux_DeviceManager.h.

Array<Notifier*> OVR::Linux::DeviceManagerThread::TicksNotifiers
private

Definition at line 117 of file OVR_Linux_DeviceManager.h.


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