aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/kernel/proc.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-11-12 22:47:49 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2022-11-12 22:47:49 +0200
commit845cf97e1faee613e3e73900f5f93bfcedc831f1 (patch)
tree17d754897f1b7bcaa8f465d917b30296e5abc3e2 /arch/riscv64/kernel/proc.c
parent605ccff557d031aa83c79087f419769756aa0953 (diff)
downloadkmi-845cf97e1faee613e3e73900f5f93bfcedc831f1.tar.gz
kmi-845cf97e1faee613e3e73900f5f93bfcedc831f1.zip
release mode, ~600k requests
Diffstat (limited to 'arch/riscv64/kernel/proc.c')
-rw-r--r--arch/riscv64/kernel/proc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/riscv64/kernel/proc.c b/arch/riscv64/kernel/proc.c
index 3c2ea59..b8f6c5d 100644
--- a/arch/riscv64/kernel/proc.c
+++ b/arch/riscv64/kernel/proc.c
@@ -65,20 +65,22 @@ vm_t get_stack(struct tcb *t)
void save_regs(struct tcb *t, void *p)
{
struct riscv_regs *r = (struct riscv_regs *)(t) - 1;
- memcpy(p, r, sizeof(*r));
+ struct riscv_regs *rp = (struct riscv_regs *)(p);
+ *rp = *r;
}
void load_regs(void *p, struct tcb *t)
{
struct riscv_regs *r = (struct riscv_regs *)(t) - 1;
- memcpy(r, p, sizeof(*r));
+ struct riscv_regs *rp = (struct riscv_regs *)(p);
+ *r = *rp;
}
void clone_regs(struct tcb *d, struct tcb *s)
{
struct riscv_regs *rd = (struct riscv_regs *)(d) - 1;
struct riscv_regs *rs = (struct riscv_regs *)(s) - 1;
- memcpy(rd, rs, sizeof(*rs));
+ *rd = *rs;
}
void adjust_ipi(struct tcb *t)