diff options
Diffstat (limited to 'src/kernel/arch')
-rw-r--r-- | src/kernel/arch/i386/sysenter.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/kernel/arch/i386/sysenter.c b/src/kernel/arch/i386/sysenter.c index cda4f15..5712ee3 100644 --- a/src/kernel/arch/i386/sysenter.c +++ b/src/kernel/arch/i386/sysenter.c @@ -23,7 +23,10 @@ _Noreturn void sysenter_stage2(void) { val = _syscall(regs->eax, regs->ebx, regs->esi, regs->edi, (uintptr_t)regs->ebp); - regs_savereturn(&process_current->regs, val); - - process_switch(process_current); // TODO process_resume + if (process_current->state == PS_RUNNING) { // TODO move to _syscall() + regs_savereturn(&process_current->regs, val); + process_switch(process_current); // TODO process_resume + } else { + process_switch_any(); + } } |