diff --git a/drivers/pit.c b/drivers/pit.c index bcd491a..ba95765 100644 --- a/drivers/pit.c +++ b/drivers/pit.c @@ -1,9 +1,9 @@ #include "pit.h" #include "io.h" #include "irq.h" +#include "klibc.h" #include "kthread.h" #include "time.h" -#include "klibc.h" int pitSetup(unsigned int freq) { @@ -21,5 +21,7 @@ struct cpu_state *pitIrqHandler(struct cpu_state *prevCpu) { __atomic_add_fetch(&jiffies, 1, __ATOMIC_RELAXED); kthreadOnJieffiesTick(); + // Uncomment for non-preemptible kernel + // return prevCpu; return kthreadSwitch(prevCpu); }