From 96e5d8dc99010e2cec8bd2edf59545bd13f6f769 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 28 May 2022 14:08:12 +0300 Subject: start implementing new proc/rpc handling + Essentially, separate root process and remote procedure call handling. I really should write down some documentation so I don't forget, but essentially: All threads share a common process virtual memory, and when a thread wants to make an rpc, it switches over to its own rpc vmem space that is linked to the remote process. --- common/proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/proc.c') diff --git a/common/proc.c b/common/proc.c index 3f6da6d..bf8a4d1 100644 --- a/common/proc.c +++ b/common/proc.c @@ -18,7 +18,7 @@ stat_t prepare_proc(struct tcb *t, vm_t bin, vm_t interp) return ERR_INVAL; alloc_stacks(t); - prepare_thread(t); + set_thread(t, t->thread_stack_top); set_return(entry); return OK; } @@ -34,7 +34,7 @@ stat_t init_proc(void *fdt) /* set current tcb */ use_tcb(t); - use_vmem(t->b_r); + use_vmem(t->proc.vmem); /* allocate stacks after ELF file to make sure nothing of importance * clashes */ -- cgit v1.3