Fixing MultiCPU thread distribution (only tested in single-cpu)
[tpg/acess2.git] / Kernel / include / threads.h
index 2b066d9..715be8c 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <arch.h>
 #include <signal.h>
+#include <proc.h>
 
 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,13 @@ 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_AddActive(tThread *Thread);
+extern tThread *Threads_GetNextToRun(int CPU, tThread *Last);
 
 #endif

UCC git Repository :: git.ucc.asn.au