Kernel processes / multitasking

This commit is contained in:
2025-08-30 23:47:25 +02:00
parent 60a530b900
commit 0273330cf4
22 changed files with 381 additions and 56 deletions

View File

@ -10,6 +10,7 @@
#include "pic.h"
#include "apic.h"
#include "pit.h"
#include "proc/proc.h"
void hal_intr_disable(void) {
asm volatile("cli");
@ -151,7 +152,7 @@ void intr_dumpframe(IntrStackFrame *frame) {
void intr_handleintr(IntrStackFrame *frame) {
if (frame->trapnum >= 0 && frame->trapnum <= 31) {
// EXCEPTION
kprintf_unsafe("ERROR", "%s, 0x%lX\n", exceptions[frame->trapnum], frame->errnum);
kprintf_unsafe("ERROR %s, 0x%lX\n", exceptions[frame->trapnum], frame->errnum);
intr_dumpframe(frame);
hal_hang();
} else if (frame->trapnum >= 32 && frame->trapnum <= 47) {
@ -161,6 +162,8 @@ void intr_handleintr(IntrStackFrame *frame) {
}
io_out8(PIC1_CMD, 0x20);
lapic_write(LAPIC_EOI, 0x00);
proc_sched((void *)frame);
}
}