diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 17:33:55 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 17:33:55 +0200 |
| commit | ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7 (patch) | |
| tree | 1273c7815d6790e746f6e7ecfcd464e5cab39f2e /arch/riscv64/kernel/proc.c | |
| parent | be78fcb0acc665d4db8edb9cda53f6863d27dd85 (diff) | |
| download | kmi-ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7.tar.gz kmi-ebe6fe5d44d58fcb1b9d0ac52fa98a0a3ff309a7.zip | |
Steps towards better status/debugging control
Diffstat (limited to 'arch/riscv64/kernel/proc.c')
| -rw-r--r-- | arch/riscv64/kernel/proc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/riscv64/kernel/proc.c b/arch/riscv64/kernel/proc.c index b696912..e2cbcea 100644 --- a/arch/riscv64/kernel/proc.c +++ b/arch/riscv64/kernel/proc.c @@ -2,14 +2,17 @@ #include <apos/elf.h> #include <csr.h> -void jump_to_userspace(struct tcb *t, int argc, char **argv) +stat_t jump_to_userspace(struct tcb *t, int argc, char **argv) { csr_write(CSR_SEPC, t->entry); __asm__ volatile ("mv sp, %0\n" : "=r" (t->proc_stack) :: "memory"); __asm__ volatile ("sret\n" ::: "memory"); + /* we should never reach this */ + return ERR_ADDR; } -void return_to_userspace(struct tcb *t) +stat_t return_to_userspace(struct tcb *t) { /* lol */ + return ERR_ADDR; } |
