aboutsummaryrefslogtreecommitdiff
path: root/common/tcb.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-05-29 01:07:48 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-05-29 01:07:48 +0300
commit0f4a751e60a6c8ac40592ff44c74f1c9e4846d9a (patch)
tree96fb1e8479261a128f065ee493ee3a97a3b91949 /common/tcb.c
parent013a27aec9370221e8afae188a8ed08ed2d406b0 (diff)
downloadkmi-0f4a751e60a6c8ac40592ff44c74f1c9e4846d9a.tar.gz
kmi-0f4a751e60a6c8ac40592ff44c74f1c9e4846d9a.zip
continue documentation efforts.
Diffstat (limited to 'common/tcb.c')
-rw-r--r--common/tcb.c10
1 files changed, 5 insertions, 5 deletions
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