diff options
author | dzwdz | 2022-04-09 19:03:29 +0200 |
---|---|---|
committer | dzwdz | 2022-04-09 19:03:29 +0200 |
commit | 59ca1c46970fa8df2d0fa4b8163a99ca418bd2cf (patch) | |
tree | b07438ddb940f206a3370bc7524f547661b41c6c /src/kernel/arch/i386 | |
parent | e17137d8d74e65e3cce7c04263d73a111bae25c0 (diff) |
kernel/vfs: prevent the vfs functions from switching processes
Diffstat (limited to 'src/kernel/arch/i386')
-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(); + } } |