# include <mp.h>
#endif
#include <hal_proc.h>
+#include <arch_int.h>
// === FLAGS ===
#define DEBUG_TRACE_SWITCH 0
void Proc_ClearThread(tThread *Thread)
{
- Log_Warning("Proc", "TODO: Nuke address space etc");
+ MM_ClearSpace(Thread->MemState.CR3);
if(Thread->SavedState.SSE) {
free(Thread->SavedState.SSE);
Thread->SavedState.SSE = NULL;
if(!newThread) return -1;
// Set CR3
+ MM_RefPhys( cur->MemState.CR3 );
newThread->MemState.CR3 = cur->MemState.CR3;
// Create new KStack
*/
void Proc_Scheduler(int CPU)
{
+#if 0
tThread *thread;
// If the spinlock is set, let it complete
regs->eflags &= ~0x100; // Clear TF
}
-#if 0
// TODO: Ack timer?
#if USE_MP
if( GetCPUNum() )