71 struct ThreadDebugInfo
76 SizeT threadStackSize;
The common base class of Nebula.
Definition refcounted.h:38
CoreId
Definition cpu.h:19
Critical section objects are used to protect a portion of code from parallel execution.
Nebula's dynamic array class.
Definition array.h:60
the list iterator
Definition list.h:76
Implements a doubly linked list.
Definition list.h:20
Win32 implementation of an event synchronization object.
Definition win32event.h:18
bool Peek() const
check if event is signalled
Definition win32event.h:128
Win32 implementation of thread class.
Definition win32thread.h:22
Priority
thread priorities
Definition win32thread.h:27
@ High
Definition win32thread.h:30
@ Low
Definition win32thread.h:28
@ Normal
Definition win32thread.h:29
void SetStackSize(SizeT s)
set stack size in bytes (default is 4 KByte)
Definition win32thread.h:132
SizeT GetStackSize() const
get stack size
Definition win32thread.h:141
Win32Thread()
constructor
Definition win32thread.cc:26
virtual void DoWork()
this method runs in the thread context
Definition win32thread.cc:189
bool IsRunning() const
return true if thread has been started
Definition win32thread.cc:163
Win32Event threadStartedEvent
Definition win32thread.h:95
void Start()
start executing the thread code, returns when thread has actually started
Definition win32thread.cc:67
Util::String name
Definition win32thread.h:100
static DWORD WINAPI ThreadProc(LPVOID self)
internal thread proc helper function
Definition win32thread.cc:200
Win32Event stopRequestEvent
Definition win32thread.h:96
SizeT stackSize
Definition win32thread.h:99
const Util::String & GetName() const
get thread name
Definition win32thread.h:180
Priority GetPriority() const
get the thread priority
Definition win32thread.h:123
HANDLE threadHandle
Definition win32thread.h:94
void SetName(const Util::String &n)
set thread name
Definition win32thread.h:166
static ThreadLocal const char * ThreadName
Definition win32thread.h:101
void Stop()
request threading code to stop, returns when thread has actually finished
Definition win32thread.cc:139
virtual ~Win32Thread()
destructor
Definition win32thread.cc:43
static void SetMyThreadName(const char *n)
set thread name from within thread context
Definition win32thread.cc:224
static const char * GetMyThreadName()
obtain name of thread from within thread context
Definition win32thread.cc:259
void SetThreadAffinity(const uint mask)
set the thread affinity
Definition win32thread.h:189
__DeclareClass(Win32Thread)
bool ThreadStopRequested() const
check if stop is requested, call from DoWork() to see if the thread proc should quit
Definition win32thread.h:154
uint affinityMask
Definition win32thread.h:98
Priority priority
Definition win32thread.h:97
static void YieldThread()
yield the thread (gives up current time slice)
Definition win32thread.cc:279
uint GetThreadAffinity()
get the thread affinity
Definition win32thread.h:198
void SetPriority(Priority p)
set the thread priority
Definition win32thread.h:114
static Threading::ThreadId GetMyThreadId()
get the thread ID of this thread
Definition win32thread.cc:269
virtual void EmitWakeupSignal()
override this method if your thread loop needs a wakeup call before stopping
Definition win32thread.cc:126
#define n_assert(exp)
Definition debug.h:50
pthread_t ThreadId
Definition linuxthreadid.h:15
[TODO: Describe Win32 subsystem]
Nebula's universal string class.
Definition string.h:50
bool IsValid() const
return true if string object is not empty
Definition string.h:684
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31