From 0f4a751e60a6c8ac40592ff44c74f1c9e4846d9a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 29 May 2022 01:07:48 +0300 Subject: continue documentation efforts. --- common/tcb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common/tcb.c') diff --git a/common/tcb.c b/common/tcb.c index 84218dc..1382f67 100644 --- a/common/tcb.c +++ b/common/tcb.c @@ -56,7 +56,7 @@ static id_t __alloc_tid(struct tcb *t) } /* TODO: add error checking */ -static vm_t __setup_call_stack(struct tcb *t, size_t bytes) +static vm_t __setup_rpc_stack(struct tcb *t, size_t bytes) { pm_t offset = 0; size_t pages = __pages(bytes); @@ -64,11 +64,11 @@ static vm_t __setup_call_stack(struct tcb *t, size_t bytes) for (size_t i = 1; i <= pages; ++i) { offset = alloc_page(BASE_PAGE, offset); map_vpage(t->proc.vmem, offset, - PROC_STACK_TOP - BASE_PAGE_SIZE * i, + RPC_STACK_TOP - BASE_PAGE_SIZE * i, flags, BASE_PAGE); } - return PROC_STACK_TOP - BASE_PAGE_SIZE * pages; + return RPC_STACK_TOP - BASE_PAGE_SIZE * pages; } static vm_t __setup_thread_stack(struct tcb *t, size_t bytes) @@ -85,9 +85,9 @@ stat_t alloc_stacks(struct tcb *t) if (!t->thread_stack) return ERR_OOMEM; - /* call stack always starts at the same place in vmem. + /* rpc stack always starts at the same place in vmem. * TODO: is this a security issue? */ - if (!__setup_call_stack(p, __call_stack_size)) + if (!__setup_rpc_stack(p, __call_stack_size)) return ERR_OOMEM; /* TODO: this only allows for a global stack size, what if a user wants -- cgit v1.3