Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::PosixThread Class Reference

#include <PosixThread.h>

Inheritance diagram for VCF::PosixThread:

VCF::ThreadPeer List of all members.

Public Member Functions

 PosixThread (Thread *thread, bool mainThread)
virtual ~PosixThread ()
virtual bool start ()
 Starts (or resumes) a thread running.
virtual void stop ()
 gracefully stops the thread and shuts it down, releasing any OS resources associated with the thread
virtual uint32 getThreadID ()
 returns the thread associated with this thread of execution
virtual OSHandleID getHandleID ()
 returns a handle ID for the thread.
virtual uint32 getOwningProcessID ()
 returns the process ID that this thread is part of
int inThreadProc ()
virtual void sleep (uint32 milliseconds)
 causes the thread the thread to sleep for the specified number of milliseconds
virtual int wait ()
virtual int wait (uint32 milliseconds)
virtual bool isActive ()

Static Protected Member Functions

static void * threadProc (void *arg)

Protected Attributes

pthread_t threadID_
pid_t processID_
Threadthread_
bool isActive_
Mutex threadSuspendMutex_
Condition threadSuspendCond_

Constructor & Destructor Documentation

VCF::PosixThread::PosixThread Thread thread,
bool  mainThread
 

virtual VCF::PosixThread::~PosixThread  )  [virtual]
 


Member Function Documentation

virtual OSHandleID VCF::PosixThread::getHandleID  )  [inline, virtual]
 

returns a handle ID for the thread.

It's use and signifigance are platform specific. On Win32 systems this is the HANDLE returned by the CreateThread/_beginthreadex() calls

Implements VCF::ThreadPeer.

virtual uint32 VCF::PosixThread::getOwningProcessID  )  [inline, virtual]
 

returns the process ID that this thread is part of

Implements VCF::ThreadPeer.

virtual uint32 VCF::PosixThread::getThreadID  )  [inline, virtual]
 

returns the thread associated with this thread of execution

Implements VCF::ThreadPeer.

int VCF::PosixThread::inThreadProc  )  [inline]
 

virtual bool VCF::PosixThread::isActive  )  [inline, virtual]
 

Implements VCF::ThreadPeer.

virtual void VCF::PosixThread::sleep uint32  milliseconds  )  [virtual]
 

causes the thread the thread to sleep for the specified number of milliseconds

Parameters:
uint32 - the number of milliseconds to sleep

Implements VCF::ThreadPeer.

virtual bool VCF::PosixThread::start  )  [virtual]
 

Starts (or resumes) a thread running.

Implements VCF::ThreadPeer.

virtual void VCF::PosixThread::stop  )  [virtual]
 

gracefully stops the thread and shuts it down, releasing any OS resources associated with the thread

Implements VCF::ThreadPeer.

static void* VCF::PosixThread::threadProc void *  arg  )  [static, protected]
 

virtual int VCF::PosixThread::wait uint32  milliseconds  )  [virtual]
 

Implements VCF::ThreadPeer.

virtual int VCF::PosixThread::wait  )  [virtual]
 

Implements VCF::ThreadPeer.


Member Data Documentation

bool VCF::PosixThread::isActive_ [protected]
 

pid_t VCF::PosixThread::processID_ [protected]
 

Thread* VCF::PosixThread::thread_ [protected]
 

pthread_t VCF::PosixThread::threadID_ [protected]
 

Condition VCF::PosixThread::threadSuspendCond_ [protected]
 

Mutex VCF::PosixThread::threadSuspendMutex_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information