syscall: imeplement basic file IO syscalls
also fix a bug where the RAX register would be restored to its initial state instead of carrying the syscall return value
This commit is contained in:
parent
bd9786cbe0
commit
0297f4a34c
9 changed files with 209 additions and 18 deletions
|
|
@ -204,6 +204,10 @@ gate_syscall:
|
|||
movq 16(%rax), %r8
|
||||
movq 56(%rax), %r9
|
||||
call syscall
|
||||
pushq %rax
|
||||
call proc_current_regs
|
||||
popq %rdi
|
||||
movq %rdi, 0(%rax)
|
||||
call schedule
|
||||
|
||||
/* void return_from_irq(struct procregs *regs, paddr_t cr3); */
|
||||
|
|
|
|||
Loading…
Reference in a new issue