From e36c8d4a404c402d4c3d96a2b0b147368e881603 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 9 Feb 2014 09:36:50 +0800 Subject: [PATCH] Kernel/x86 - Add flag to set PIT to larges possible divisor --- KernelLand/Kernel/arch/x86/proc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/KernelLand/Kernel/arch/x86/proc.c b/KernelLand/Kernel/arch/x86/proc.c index 2869c3c3..dac26c9b 100644 --- a/KernelLand/Kernel/arch/x86/proc.c +++ b/KernelLand/Kernel/arch/x86/proc.c @@ -24,11 +24,14 @@ #define DEBUG_DISABLE_DOUBLEFAULT 1 #define DEBUG_VERY_SLOW_PERIOD 0 #define DEBUG_NOPREEMPT 1 +#define DISABLE_PIT 0 // === CONSTANTS === // Base is 1193182 #define TIMER_BASE 1193182 -#if DEBUG_VERY_SLOW_PERIOD +#if DISABLE_PIT +# define TIMER_DIVISOR 0xFFFF +#elif DEBUG_VERY_SLOW_PERIOD # define TIMER_DIVISOR 1193 //~10Hz switch, with 10 quantum = 1s per thread #else # define TIMER_DIVISOR 11932 //~100Hz -- 2.20.1