SysThread Class Reference

#include <SysThread.hpp>

Inheritance diagram for SysThread:
[legend]

Public Types

enum  ThreadPriority {
  LOW_PRIORITY , MEDIUM_PRIORITY , GUARDED_PRIORITY , HIGH_PRIORITY ,
  LOW_PRIORITY , MEDIUM_PRIORITY , GUARDED_PRIORITY , HIGH_PRIORITY
}
 
enum  { THREAD_STACK_SIZE = 1024*96 }
 
enum  ThreadPriority {
  LOW_PRIORITY , MEDIUM_PRIORITY , GUARDED_PRIORITY , HIGH_PRIORITY ,
  LOW_PRIORITY , MEDIUM_PRIORITY , GUARDED_PRIORITY , HIGH_PRIORITY
}
 
enum  { THREAD_STACK_SIZE = 1024*96 }
 

Public Member Functions

 SysThread ()
 
virtual ~SysThread ()
 
 SysThread (pthread_t tID)
 
virtual void attachThread ()
 
void setPriority (int priority)
 
virtual void dispatch ()
 
void terminate ()
 
void startup ()
 
void shutdown ()
 
void yield ()
 
uintptr_t threadID ()
 
bool equals (SysThread &other)
 
size_t hash ()
 
 SysThread ()
 
virtual ~SysThread ()
 
 SysThread (thread_id_t threadID)
 
virtual void attachThread ()
 
void setPriority (ThreadPriority priority)
 
virtual void dispatch ()
 
void terminate ()
 
void startup ()
 
void shutdown ()
 
void yield ()
 
uintptr_t threadID ()
 
bool equals (SysThread &other)
 
size_t hash ()
 

Protected Member Functions

void createThread ()
 
void createThread ()
 

Protected Attributes

bool attached
 
pthread_t _threadID
 
HANDLE _threadHandle
 
DWORD _threadID
 

Detailed Description

Definition at line 56 of file unix/SysThread.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
THREAD_STACK_SIZE 

Definition at line 68 of file unix/SysThread.hpp.

◆ anonymous enum

anonymous enum
Enumerator
THREAD_STACK_SIZE 

Definition at line 67 of file windows/SysThread.hpp.

◆ ThreadPriority [1/2]

Enumerator
LOW_PRIORITY 
MEDIUM_PRIORITY 
GUARDED_PRIORITY 
HIGH_PRIORITY 
LOW_PRIORITY 
MEDIUM_PRIORITY 
GUARDED_PRIORITY 
HIGH_PRIORITY 

Definition at line 60 of file unix/SysThread.hpp.

◆ ThreadPriority [2/2]

Enumerator
LOW_PRIORITY 
MEDIUM_PRIORITY 
GUARDED_PRIORITY 
HIGH_PRIORITY 
LOW_PRIORITY 
MEDIUM_PRIORITY 
GUARDED_PRIORITY 
HIGH_PRIORITY 

Definition at line 59 of file windows/SysThread.hpp.

Constructor & Destructor Documentation

◆ SysThread() [1/4]

SysThread::SysThread ( )
inline

Definition at line 73 of file unix/SysThread.hpp.

◆ ~SysThread() [1/2]

virtual SysThread::~SysThread ( )
inlinevirtual

Definition at line 74 of file unix/SysThread.hpp.

◆ SysThread() [2/4]

SysThread::SysThread ( pthread_t  tID)
inline

Definition at line 76 of file unix/SysThread.hpp.

References _threadID.

◆ SysThread() [3/4]

SysThread::SysThread ( )
inline

Definition at line 72 of file windows/SysThread.hpp.

◆ ~SysThread() [2/2]

virtual SysThread::~SysThread ( )
inlinevirtual

Definition at line 73 of file windows/SysThread.hpp.

◆ SysThread() [4/4]

SysThread::SysThread ( thread_id_t  threadID)
inline

Definition at line 75 of file windows/SysThread.hpp.

References _threadID, and threadID().

Member Function Documentation

◆ attachThread() [1/2]

void SysThread::attachThread ( )
virtual

Definition at line 54 of file unix/SysThread.cpp.

References _threadID, and attached.

◆ attachThread() [2/2]

virtual void SysThread::attachThread ( )
virtual

◆ createThread() [1/2]

void SysThread::createThread ( void  )
protected

Definition at line 123 of file unix/SysThread.cpp.

References _threadID, attached, call_thread_function(), and THREAD_STACK_SIZE.

Referenced by APIServerThread::start().

◆ createThread() [2/2]

void SysThread::createThread ( )
protected

◆ dispatch() [1/2]

void SysThread::dispatch ( )
virtual

Reimplemented in APIServerThread.

Definition at line 75 of file unix/SysThread.cpp.

◆ dispatch() [2/2]

virtual void SysThread::dispatch ( )
virtual

Reimplemented in APIServerThread.

◆ equals() [1/2]

bool SysThread::equals ( SysThread other)

Definition at line 109 of file unix/SysThread.cpp.

References _threadID.

◆ equals() [2/2]

bool SysThread::equals ( SysThread other)

◆ hash() [1/2]

size_t SysThread::hash ( )
inline

Definition at line 92 of file unix/SysThread.hpp.

References _threadID.

◆ hash() [2/2]

size_t SysThread::hash ( )
inline

Definition at line 91 of file windows/SysThread.hpp.

References _threadHandle.

◆ setPriority() [1/2]

void SysThread::setPriority ( int  priority)

Definition at line 62 of file unix/SysThread.cpp.

References _threadID.

◆ setPriority() [2/2]

void SysThread::setPriority ( ThreadPriority  priority)

◆ shutdown() [1/2]

void SysThread::shutdown ( )

Definition at line 97 of file unix/SysThread.cpp.

◆ shutdown() [2/2]

void SysThread::shutdown ( )

◆ startup() [1/2]

void SysThread::startup ( )

Definition at line 91 of file unix/SysThread.cpp.

◆ startup() [2/2]

void SysThread::startup ( )

◆ terminate() [1/2]

void SysThread::terminate ( )

◆ terminate() [2/2]

void SysThread::terminate ( )

◆ threadID() [1/2]

uintptr_t SysThread::threadID ( )
inline

Definition at line 88 of file unix/SysThread.hpp.

References _threadID.

Referenced by SysThread().

◆ threadID() [2/2]

uintptr_t SysThread::threadID ( )
inline

Definition at line 87 of file windows/SysThread.hpp.

References _threadID.

◆ yield() [1/2]

void SysThread::yield ( )

Definition at line 103 of file unix/SysThread.cpp.

◆ yield() [2/2]

void SysThread::yield ( )

Member Data Documentation

◆ _threadHandle

HANDLE SysThread::_threadHandle
protected

Definition at line 97 of file windows/SysThread.hpp.

Referenced by hash(), and setPriority().

◆ _threadID [1/2]

pthread_t SysThread::_threadID
protected

◆ _threadID [2/2]

DWORD SysThread::_threadID
protected

Definition at line 98 of file windows/SysThread.hpp.

◆ attached

bool SysThread::attached
protected

Definition at line 98 of file unix/SysThread.hpp.

Referenced by attachThread(), createThread(), and terminate().


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