# include <mp.h>
#endif
+// === FLAGS ===
+#define DEBUG_TRACE_SWITCH 0
+
// === CONSTANTS ===
#define SWITCH_MAGIC 0xFFFACE55 // There is no code in this area
#define TIMER_DIVISOR 11931 //~100Hz
newThread->SavedState.EBP = ebp;
eip = GetEIP();
if(eip == SWITCH_MAGIC) {
- Log("Thread %i running", Proc_GetCurThread()->TID);
outb(0x20, 0x20); // ACK Timer and return as child
return 0;
}
return;
}
+ #if DEBUG_TRACE_SWITCH
+ Log("Switching to task %i, CR3 = 0x%x, EIP = %p",
+ thread->TID,
+ thread->MemState.CR3,
+ thread->SavedState.EIP
+ );
+ #endif
+
// Set current thread
gCurrentThread = thread;