summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2021-09-11 18:04:57 +0200
committerdzwdz2021-09-11 18:04:57 +0200
commitaf2f9184e03015dc3b188ea437bbf496638000ce (patch)
tree4b4186d8df73bc1b96e14e5c8eadcf1a4f66692a /src/kernel/proc.c
parent0994192f6cab853f4a49ac73aa63f6820c886ec2 (diff)
replace `user_ptr` with a linux-style `__user` annotation
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 8d363a8..21a1d54 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -26,14 +26,14 @@ struct process *process_seed(void) {
proc->handles[i].type = HANDLE_EMPTY;
// map the stack to the last page in memory
- pagedir_map(proc->pages, ~PAGE_MASK, page_alloc(1), true, true);
- proc->stack_top = proc->regs.esp = ~0xF;
+ pagedir_map(proc->pages, (userptr_t)~PAGE_MASK, page_alloc(1), true, true);
+ proc->stack_top = proc->regs.esp = (userptr_t) ~0xF;
// map the kernel
// yup, .text is writeable too. the plan is to not map the kernel
// into user memory at all, but i'll implement that later. TODO
for (size_t p = 0x100000; p < (size_t)&_bss_end; p += PAGE_SIZE)
- pagedir_map(proc->pages, p, (void*)p, false, true);
+ pagedir_map(proc->pages, (userptr_t)p, (void*)p, false, true);
// the kernel still has to load the executable code and set EIP
return proc;