Forward return value of syscall.

This commit is contained in:
Danila Fedorin 2019-04-23 17:10:35 -07:00
parent 9231075799
commit 94b52c5730

View File

@ -203,12 +203,13 @@ trap_dispatch(struct Trapframe *tf)
monitor(tf);
return;
} else if (tf->tf_trapno == T_SYSCALL) {
syscall(tf->tf_regs.reg_eax,
int32_t returned = syscall(tf->tf_regs.reg_eax,
tf->tf_regs.reg_edx,
tf->tf_regs.reg_ecx,
tf->tf_regs.reg_ebx,
tf->tf_regs.reg_edi,
tf->tf_regs.reg_esi);
tf->tf_regs.reg_eax = returned;
return;
}