summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
authordzwdz2021-07-24 16:55:15 +0200
committerdzwdz2021-07-24 16:55:15 +0200
commit4d5e930c48cded790f77497911706aa8f5ff0965 (patch)
treeb256d379f5841d28a74fb28b6d01720cb14a5878 /src/kernel/proc.c
parent67a359d8c4b9f5cb3d2e1fb9602ebe5dfd3978cf (diff)
save all registers on syscalls
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index a3adf41..a64d5ee 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -11,7 +11,7 @@ struct process *process_new() {
// map the stack to the last page in memory
pagedir_map(proc->pages, (void*)~PAGE_MASK, page_alloc(1), true, true);
- proc->stack_top = proc->esp = (void*) ~0xF;
+ proc->stack_top = proc->regs.esp = (void*) ~0xF;
// map the kernel
// yup, .text is writeable too. the plan is to not map the kernel
@@ -26,5 +26,5 @@ struct process *process_new() {
void process_switch(struct process *proc) {
process_current = proc;
pagedir_switch(proc->pages);
- sysexit(proc->eip, proc->esp);
+ sysexit(proc->regs.eip, proc->regs.esp);
}