X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Fthreads.h;h=b7d9bad52be1fecfa43462a0bc063a9a86bb5fa9;hb=39b369885f510690e596190ff8a71c9975438ed2;hp=2b066d9f338f917fdd2d4fdc813ea4bcbe9ad216;hpb=5beb98670f040b2d4e697e4d8690cd46d2d30cf3;p=tpg%2Facess2.git diff --git a/Kernel/include/threads.h b/Kernel/include/threads.h index 2b066d9f..b7d9bad5 100644 --- a/Kernel/include/threads.h +++ b/Kernel/include/threads.h @@ -5,6 +5,7 @@ #include #include +#include typedef struct sMessage { @@ -55,6 +56,9 @@ typedef struct sThread int NumTickets; //!< Priority - Chance of gaining CPU Uint Config[NUM_CFG_ENTRIES]; //!< Per-process configuration + + // --- proc.c's + volatile int CurCPU; } tThread; @@ -77,10 +81,14 @@ enum eFaultNumbers FAULT_FLOAT }; +#define GETMSG_IGNORE ((void*)-1) + // === FUNCTIONS === -extern tThread *Proc_GetCurThread(); +extern tThread *Proc_GetCurThread(void); extern tThread *Threads_GetThread(Uint TID); -extern void Threads_Wake(tThread *Thread); +extern void Threads_SetTickets(tThread *Thread, int Num); +extern int Threads_Wake(tThread *Thread); extern void Threads_AddActive(tThread *Thread); +extern tThread *Threads_GetNextToRun(int CPU, tThread *Last); #endif