struct sThread *Next;
struct sThread *GlobalNext; //!< Next thread in global list
struct sThread *GlobalPrev; //!< Previous thread in global list
struct sThread *Next;
struct sThread *GlobalNext; //!< Next thread in global list
struct sThread *GlobalPrev; //!< Previous thread in global list
tShortSpinlock IsLocked; //!< Thread's spinlock
volatile int Status; //!< Thread Status
void *WaitPointer; //!< What (Mutex/Thread/other) is the thread waiting on
tShortSpinlock IsLocked; //!< Thread's spinlock
volatile int Status; //!< Thread Status
void *WaitPointer; //!< What (Mutex/Thread/other) is the thread waiting on
struct sProcess *Process; //!< Thread Group / Process
struct sThread *Parent; //!< Parent Thread
char *ThreadName; //!< Name of thread
struct sProcess *Process; //!< Thread Group / Process
struct sThread *Parent; //!< Parent Thread
char *ThreadName; //!< Name of thread
int CurFaultNum; //!< Current fault number, 0: none
tVAddr FaultHandler; //!< Fault Handler
int CurFaultNum; //!< Current fault number, 0: none
tVAddr FaultHandler; //!< Fault Handler
tMsg * volatile Messages; //!< Message Queue
tMsg *LastMessage; //!< Last Message (speeds up insertion)
tMsg * volatile Messages; //!< Message Queue
tMsg *LastMessage; //!< Last Message (speeds up insertion)
THREAD_STAT_NULL, // Invalid process
THREAD_STAT_ACTIVE, // Running and schedulable process
THREAD_STAT_SLEEPING, // Message Sleep
THREAD_STAT_MUTEXSLEEP, // Mutex Sleep
THREAD_STAT_NULL, // Invalid process
THREAD_STAT_ACTIVE, // Running and schedulable process
THREAD_STAT_SLEEPING, // Message Sleep
THREAD_STAT_MUTEXSLEEP, // Mutex Sleep
THREAD_STAT_SEMAPHORESLEEP, // Semaphore Sleep
THREAD_STAT_QUEUESLEEP, // Queue
THREAD_STAT_EVENTSLEEP, // Event sleep
THREAD_STAT_SEMAPHORESLEEP, // Semaphore Sleep
THREAD_STAT_QUEUESLEEP, // Queue
THREAD_STAT_EVENTSLEEP, // Event sleep
"THREAD_STAT_SEMAPHORESLEEP",
"THREAD_STAT_QUEUESLEEP",
"THREAD_STAT_EVENTSLEEP",
"THREAD_STAT_SEMAPHORESLEEP",
"THREAD_STAT_QUEUESLEEP",
"THREAD_STAT_EVENTSLEEP",
extern tThread *Threads_GetThread(Uint TID);
extern void Threads_SetPriority(tThread *Thread, int Pri);
extern int Threads_Wake(tThread *Thread);
extern tThread *Threads_GetThread(Uint TID);
extern void Threads_SetPriority(tThread *Thread, int Pri);
extern int Threads_Wake(tThread *Thread);