x86_64: irq: initialise tr_irqctx before running syscall handler

This commit is contained in:
2026-04-19 20:05:11 +01:00
parent 9a9b0f63ba
commit c87c29366d
+6
View File
@@ -217,6 +217,12 @@ void irq_dispatch(struct ml_cpu_context *regs)
void syscall_dispatch(struct ml_cpu_context *regs) void syscall_dispatch(struct ml_cpu_context *regs)
{ {
struct thread *thr = get_current_thread();
if (thr) {
thr->tr_irqctx = regs;
put_current_thread(thr);
}
unsigned int sysid = regs->rax; unsigned int sysid = regs->rax;
virt_addr_t syscall_impl = syscall_get_function(sysid); virt_addr_t syscall_impl = syscall_get_function(sysid);