diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 23:35:33 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-11 23:35:33 +0300 |
| commit | 62ee0f7e1936a9eccb55fa360a1dce223819e0b8 (patch) | |
| tree | 2c67698cac4e94cd7643f7acf19f1ada12f37472 /arch/riscv64/kernel/cpu.c | |
| parent | 56fb0b774a8e89be1cb7ab1e5f464bbedd19fb22 (diff) | |
| download | kmi-62ee0f7e1936a9eccb55fa360a1dce223819e0b8.tar.gz kmi-62ee0f7e1936a9eccb55fa360a1dce223819e0b8.zip | |
continue documentation
Diffstat (limited to 'arch/riscv64/kernel/cpu.c')
| -rw-r--r-- | arch/riscv64/kernel/cpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv64/kernel/cpu.c b/arch/riscv64/kernel/cpu.c index 91b39b6..966dfec 100644 --- a/arch/riscv64/kernel/cpu.c +++ b/arch/riscv64/kernel/cpu.c @@ -6,6 +6,11 @@ #include <apos/tcb.h> #include <arch/cpu.h> +void cpu_assign(struct tcb *t) +{ + __asm__ volatile ("mv tp, %0\n" : : "r" (t) :); +} + id_t cpu_id() { /* yes, slightly weird situation where cur_tcb() call cpu_id() which |
