// Error Check
if(thread == NULL) {
thread = gaCPUs[CPU].IdleThread;
- Warning("Hmm... Threads_GetNextToRun returned NULL, I don't think this should happen.\n");
+ //Warning("Hmm... Threads_GetNextToRun returned NULL, I don't think this should happen.\n");
+ //LogF("Zzzzz.\n");
return;
}
#if DEBUG_TRACE_SWITCH
- Log("Switching to task %i, CR3 = 0x%x, RIP = %p",
+ LogF("Switching to task %i, CR3 = 0x%x, RIP = %p",
thread->TID,
thread->MemState.CR3,
thread->SavedState.RIP
);
#endif
+
+ if(CPU > MAX_CPUS)
+ LogF("CPU = %i", CPU);
// Set current thread
gaCPUs[CPU].Current = thread;