diff options
author | Anton Kling <anton@kling.gg> | 2024-02-07 11:43:39 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-02-07 22:25:47 +0100 |
commit | 08c446612959fb190c7d6f604c69031007c3bc23 (patch) | |
tree | f78718190c5c86c5a5882a5260470402277b345d /kernel/init | |
parent | 44508f1c962060b68527fa020969ec04d3e250c6 (diff) |
Remove sti and cli inline assembly
Diffstat (limited to 'kernel/init')
-rw-r--r-- | kernel/init/kernel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/init/kernel.c b/kernel/init/kernel.c index 67aab12..e829ce3 100644 --- a/kernel/init/kernel.c +++ b/kernel/init/kernel.c @@ -16,6 +16,7 @@ #include <fs/ext2.h> #include <fs/shm.h> #include <fs/vfs.h> +#include <interrupts.h> #include <log.h> #include <mmu.h> #include <multiboot.h> @@ -44,7 +45,7 @@ void kernel_main(u32 kernel_end, unsigned long magic, unsigned long addr, data_end = 0xc0400000; inital_esp = inital_stack; - asm("cli"); + disable_interrupts(); kprintf("If you see this then the serial driver works :D.\n"); assert(magic == MULTIBOOT_BOOTLOADER_MAGIC); @@ -106,7 +107,7 @@ void kernel_main(u32 kernel_end, unsigned long magic, unsigned long addr, } } for (;;) { - asm("sti"); + enable_interrupts(); switch_task(0); } } |