72 struct ThreadDebugInfo
77 SizeT threadStackSize;
The common base class of Nebula.
Definition refcounted.h:38
Linux implementation of Threading::Thread.
Definition linuxthread.h:20
ThreadState volatile threadState
Definition linuxthread.h:111
ThreadState
thread states
Definition linuxthread.h:100
@ Initial
Definition linuxthread.h:101
@ Stopped
Definition linuxthread.h:103
@ Running
Definition linuxthread.h:102
SizeT stackSize
Definition linuxthread.h:109
Util::String name
Definition linuxthread.h:110
static void SetMyThreadName(const Util::String &n)
set thread name
Definition linuxthread.cc:292
void SetName(const Util::String &n)
set thread name
Definition linuxthread.h:186
Threading::Event threadStartedEvent
Definition linuxthread.h:113
virtual void DoWork()
this method runs in the thread context
Definition linuxthread.cc:217
virtual ~LinuxThread()
destructor
Definition linuxthread.cc:53
SizeT GetStackSize() const
get stack size
Definition linuxthread.h:154
static void YieldThread()
yield the thread (gives up current time slice)
Definition linuxthread.cc:250
static void * ThreadProc(void *)
Internal static helper method.
Definition linuxthread.cc:171
const Util::String & GetName() const
get thread name
Definition linuxthread.h:198
bool IsRunning() const
return true if thread has been started
Definition linuxthread.cc:203
void Stop()
request threading code to stop, returns when thread has actually finished
Definition linuxthread.cc:148
void SetPriority(Priority p)
set the thread priority
Definition linuxthread.h:127
static Threading::ThreadId GetMyThreadId()
get the thread ID of this thread
Definition linuxthread.cc:227
LinuxThread()
constructor
Definition linuxthread.cc:36
pthread_t thread
Definition linuxthread.h:106
__DeclareClass(LinuxThread)
cpu_set_t affinity
Definition linuxthread.h:107
static const char * GetMyThreadName()
get name of thread
Definition linuxthread.cc:314
bool ThreadStopRequested() const
check if stop is requested, call from DoWork() to see if the thread proc should quit
Definition linuxthread.h:176
void Start()
start executing the thread code, returns when thread has actually started
Definition linuxthread.cc:74
static bool GetMyThreadStopRequested()
get the stop-requested state of this thread (not yet implemented in Linux)
Definition linuxthread.cc:239
void SetMaxStackSize(SizeT s)
set maximum thread size
Definition linuxthread.h:163
Priority GetPriority() const
get the thread priority
Definition linuxthread.h:136
Priority
thread priorities
Definition linuxthread.h:25
@ Normal
Definition linuxthread.h:27
@ High
Definition linuxthread.h:28
@ Low
Definition linuxthread.h:26
virtual void EmitWakeupSignal()
override this method if your thread loop needs a wakeup call before stopping
Definition linuxthread.cc:135
void SetStackSize(SizeT s)
set stack size in bytes
Definition linuxthread.h:145
void SetThreadAffinity(uint mask)
set thread affinity
Definition linuxthread.cc:342
Priority priority
Definition linuxthread.h:108
uint GetThreadAffinity()
set thread affinity
Definition linuxthread.cc:355
Threading::Event stopRequestEvent
Definition linuxthread.h:114
static int GetMyThreadPriority()
get the current actual thread-priority of this thread (platform specific!)
Definition linuxthread.cc:330
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
#define n_assert(exp)
Definition debug.h:50
Definition linuxcompletioncounter.h:15
pthread_t ThreadId
Definition linuxthreadid.h:15
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