syscall: change handling of exceptions and traps

This commit is contained in:
Michael Shaw 2023-11-21 19:19:14 -05:00
commit 0a0235612e
5 changed files with 59 additions and 18 deletions

View file

@ -201,7 +201,7 @@ gate_syscall:
movq 40(%rax), %rsi /* arguments */
call syscall
call schedule
iretq
/* void return_from_irq(struct procregs *regs, paddr_t cr3); */
.global _return_to_user

View file

@ -35,6 +35,7 @@ void sys_exit(int status)
kprintf("(syscall)Process %d exited with status 0x%x\n", getpid(), status);
proc_set_current(0);
schedule();
}
static void syscall_insert(uint64_t syscall_no, syscall_t syscall)