From 70930ecf50269d2360c8460fe53f42bd48258040 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sun, 3 May 2020 23:14:40 +0200 Subject: [PATCH] Add comment for non-preempt kernel --- drivers/pit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }