diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-22 13:19:50 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-22 13:19:50 +0300 |
| commit | 66b39eb7ce9605cbb70defdca7f0eb144855ddcd (patch) | |
| tree | 702bd65c46591052f40987c848b664a84057f7e7 /arch/riscv64/kernel | |
| parent | 4168cca8124acdbd1866eb87810efe1cfe16903c (diff) | |
| download | kmi-66b39eb7ce9605cbb70defdca7f0eb144855ddcd.tar.gz kmi-66b39eb7ce9605cbb70defdca7f0eb144855ddcd.zip | |
change sys_ret handling to always include id
Diffstat (limited to 'arch/riscv64/kernel')
| -rw-r--r-- | arch/riscv64/kernel/proc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/riscv64/kernel/proc.c b/arch/riscv64/kernel/proc.c index aa33ec7..d3896c1 100644 --- a/arch/riscv64/kernel/proc.c +++ b/arch/riscv64/kernel/proc.c @@ -58,18 +58,18 @@ void run_init(struct tcb *t, vm_t fdt, vm_t initrd) unreachable(); } -void set_args(struct tcb *t, size_t n, struct sys_ret a) +void set_ret(struct tcb *t, size_t n, struct sys_ret a) { struct riscv_regs *r = (struct riscv_regs *)(t->regs) - 1; if (n >= 1) r->a0 = a.s; - if (n >= 2) r->a1 = a.a0; - if (n >= 3) r->a2 = a.a1; - if (n >= 4) r->a3 = a.a2; - if (n >= 5) r->a4 = a.a3; - if (n >= 6) r->a5 = a.a4; + if (n >= 2) r->a1 = a.id; + if (n >= 3) r->a2 = a.a0; + if (n >= 4) r->a3 = a.a1; + if (n >= 5) r->a4 = a.a2; + if (n >= 6) r->a5 = a.a3; } -struct sys_ret get_args(struct tcb *t) +struct sys_ret get_ret(struct tcb *t) { struct riscv_regs *r = (struct riscv_regs *)(t->regs) - 1; return SYS_RET6(r->a0, r->a1, r->a2, r->a3, r->a4, r->a5); |
