diff --git a/src/multitasking/process.c b/src/multitasking/process.c index b47462d..32fd3a5 100644 --- a/src/multitasking/process.c +++ b/src/multitasking/process.c @@ -5,6 +5,7 @@ #include "thread.h" #include "string.h" +#include struct pcb *create_process(uid_t uid) { @@ -24,6 +25,7 @@ struct pcb *create_process(uid_t uid) new_pcb->cr3 = (void *)((uint32_t)VA2PTE((uint32_t)new_pcb->heap) & PAGE_MASK); memcpy(new_pcb->heap, PD, 4096); + new_pcb->heap[1023] = (uint32_t) new_pcb->cr3 | INIT_FLAGS; new_pcb->daddy = NULL; new_pcb->children = NULL;