X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Fthreads_int.h;h=0192e7a254ead5db9aa12b61c90c54a247c16a91;hb=61cfad415a64c52ca253460231046f47fcb7fb15;hp=f5c7b1b85508c413d553a2622483995cdf992e71;hpb=9c61cf12758c0977ee1dc5791cba638fd3437ba6;p=tpg%2Facess2.git diff --git a/Kernel/include/threads_int.h b/Kernel/include/threads_int.h index f5c7b1b8..0192e7a2 100644 --- a/Kernel/include/threads_int.h +++ b/Kernel/include/threads_int.h @@ -23,7 +23,7 @@ typedef struct sMessage * \brief Core threading structure * */ -typedef struct sThread +struct sThread { // --- threads.c's /** @@ -69,7 +69,10 @@ typedef struct sThread volatile int CurCPU; int bInstrTrace; -} tThread; + + // --- event.c + Uint32 EventState; +}; enum { @@ -78,6 +81,8 @@ enum { 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_WAITING, // ??? (Waiting for a thread) THREAD_STAT_PREINIT, // Being created THREAD_STAT_ZOMBIE, // Died/Killed, but parent not informed @@ -90,6 +95,8 @@ static const char * const casTHREAD_STAT[] = { "THREAD_STAT_SLEEPING", "THREAD_STAT_MUTEXSLEEP", "THREAD_STAT_SEMAPHORESLEEP", + "THREAD_STAT_QUEUESLEEP", + "THREAD_STAT_EVENTSLEEP", "THREAD_STAT_WAITING", "THREAD_STAT_PREINIT", "THREAD_STAT_ZOMBIE", @@ -99,6 +106,7 @@ static const char * const casTHREAD_STAT[] = { // === GLOBALS === extern BOOL gaThreads_NoTaskSwitch[MAX_CPUS]; +extern tShortSpinlock glThreadListLock; // === FUNCTIONS === extern tThread *Proc_GetCurThread(void); @@ -109,9 +117,10 @@ extern int Threads_Wake(tThread *Thread); extern void Threads_Kill(tThread *Thread, int Status); extern void Threads_AddActive(tThread *Thread); extern tThread *Threads_RemActive(void); +extern void Threads_Delete(tThread *Thread); extern tThread *Threads_GetNextToRun(int CPU, tThread *Last); -extern tThread *Threads_CloneTCB(Uint *Err, Uint Flags); +extern tThread *Threads_CloneTCB(Uint Flags); extern tThread *Threads_CloneThreadZero(void); #endif