diff options
author | Danny Holman <dholman@gymli.org> | 2025-01-12 01:17:36 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2025-01-12 01:19:11 -0600 |
commit | 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf (patch) | |
tree | c8c35347b50477929727fa5be9f5d0f55cbe18fd /arch/i386/kernel/timer.c | |
parent | 5e166f3042a8e7b3031aae4da7006f80caa53ecc (diff) |
PROJECT RESTRUCTURING
Move the entire kernel into its own directory. Create new directories
for system commands, libraries and other required essentials for a
complete Unix-like operating system.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/kernel/timer.c')
-rw-r--r-- | arch/i386/kernel/timer.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/i386/kernel/timer.c b/arch/i386/kernel/timer.c deleted file mode 100644 index a7d88dd..0000000 --- a/arch/i386/kernel/timer.c +++ /dev/null @@ -1,24 +0,0 @@ -#include <kernel/timer.h> -#include <kernel/asm.h> -#include <kernel/pic.h> - -static uint32_t num_ticks = 0; - -void timer_handler(struct isr_frame *frame) { - num_ticks++; - if (num_ticks == 3) { - num_ticks = 0; - schedule_next(); - } -} - -void timer_init(void) { - disable_ints(); - int divisor = 1193182 / 100; - outb(0x43, 0x34); - outb(0x40, divisor && 0xFF); - outb(0x40, divisor && 0xFF00 >> 8); - enable_ints(); - - register_irq_handler(0, timer_handler); -} |