diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 19:08:18 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 19:08:18 +0300 |
| commit | 426da8be0db33405b0cfe53108b65040623972f0 (patch) | |
| tree | c1776cf14695d717a92d5d46d7a07c978a0e3618 /arch/riscv64/kernel/proc.c | |
| parent | de99380f12f8e2fe4acf7734db0e1e37a356c45f (diff) | |
| download | kmi-426da8be0db33405b0cfe53108b65040623972f0.tar.gz kmi-426da8be0db33405b0cfe53108b65040623972f0.zip | |
continue documentation
Diffstat (limited to 'arch/riscv64/kernel/proc.c')
| -rw-r--r-- | arch/riscv64/kernel/proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/riscv64/kernel/proc.c b/arch/riscv64/kernel/proc.c index 09d694f..a85ae6f 100644 --- a/arch/riscv64/kernel/proc.c +++ b/arch/riscv64/kernel/proc.c @@ -33,15 +33,15 @@ stat_t set_ipc(struct tcb *t, id_t pid, id_t tid) return OK; } -stat_t set_thread(struct tcb *t, vm_t stack) +stat_t set_thread(struct tcb *t) { /* get location of registers in memory */ /** \todo check alignment, should be fine but just to be sure */ struct riscv_regs *r = (struct riscv_regs *)(--t); /* insert important values into register slots */ - r->sp = (long)stack; - r->tp = (long)t; + r->sp = (long)t->thread_stack_top; + r->tp = (long)t->thread_storage; return OK; } |
