#define DEBUG_TRACE_SWITCH 0
#define DEBUG_DISABLE_DOUBLEFAULT 1
#define DEBUG_VERY_SLOW_PERIOD 0
+#define DEBUG_NOPREEMPT 1
// === CONSTANTS ===
// Base is 1193182
*/
void Proc_Scheduler(int CPU)
{
+ #if USE_MP
+ if( GetCPUNum() )
+ gpMP_LocalAPIC->EOI.Val = 0;
+ else
+ #endif
+ outb(0x20, 0x20);
+ __asm__ __volatile__ ("sti");
+
+ // Call the timer update code
+ Timer_CallTimers();
+
+ #if !DEBUG_NOPREEMPT
// If two ticks happen within the same task, and it's not an idle task, swap
if( gaCPUs[CPU].Current->TID > giNumCPUs && gaCPUs[CPU].Current == gaCPUs[CPU].LastTimerThread )
{
Proc_Reschedule();
}
+
gaCPUs[CPU].LastTimerThread = gaCPUs[CPU].Current;
- // Call the timer update code
- Timer_CallTimers();
+ #endif
}
// === EXPORTS ===