Commit 99c55ce5 by triazo

Allocate space for a kstack

parent ca531e3d
Showing with 4 additions and 1 deletions
......@@ -61,7 +61,7 @@ typedef struct
page_directory_entry* mem;
volatile int pid;
struct process* parent;
char* kstack;//apparently we need this. idk why
char* kstack; //apparently we need this. idk why
trapframe* tf;
context* ctxt;
char name[32];
......
......@@ -69,6 +69,9 @@ void load_elf(elf_header* elf_start)
pcb->ctxt = (context*)((size_t)pcb + sizeof(process));
pcb->tf = (trapframe*)((size_t)pcb + sizeof(process) + sizeof(context));
// And of course, a kstack
pcb->kstack = (char*)kmalloc(0x1000);
pcb->mem = pgdir;
pcb->pid = -1;
pcb->parent = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment