From 2dadbfc899df4179ca70c4ea04f74a5e190c2ae7 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 26 Sep 2025 13:17:41 -0400 Subject: fix usermode interrupts. add ability to define custom interrupt handlers --- arch/x86_64/tasking/tcb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/x86_64/tasking') diff --git a/arch/x86_64/tasking/tcb.c b/arch/x86_64/tasking/tcb.c index 9877455..3cae29f 100644 --- a/arch/x86_64/tasking/tcb.c +++ b/arch/x86_64/tasking/tcb.c @@ -24,8 +24,10 @@ tcb_init(void *task_main) .type = KO_TCB, .data = vptr_tophys_koff((uintptr_t)_init_tcb) }; - - ((processor_t*)processor_current())->tcb = _init_tcb; + + processor_t* proc = processor_current(); + proc->tcb = _init_tcb; + proc->tss.rsp0 = _init_tcb->ksp; __asm__ volatile("\ movq %0, %%rsp; \ -- cgit v1.2.1