#ifndef _JOVE_x86_64_HAL_PROCESS_H #define _JOVE_x86_64_HAL_PROCESS_H 1 #include "hal/obj.h" #include "arch/x86_64/x86_64.h" enum pcb_state { PCB_DEAD, PCB_READY, PCB_RUNNING, PCB_BLOCKED }; struct pcb_mailbox { jove_obj_t *obj; uintmax_t pcbid; }; typedef struct process_control_block { jove_obj_t *rootdir; uintptr_t pml4; enum pcb_state state; int killed; struct pcb_mailbox send, recv; struct cpu_context context; void *ksp; char kstack[]; } pcb_t; #define PCB_KSTACK_SIZE (0x1000 - sizeof(pcb_t)) #endif