From c2788174198632e0c8bdbfa7762081f595460bdf Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 29 Sep 2026 12:53:57 -0400 Subject: move process code into proc. add panic folder --- arch/x86_64/proc/process.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 arch/x86_64/proc/process.h (limited to 'arch/x86_64/proc/process.h') diff --git a/arch/x86_64/proc/process.h b/arch/x86_64/proc/process.h new file mode 100644 index 0000000..cf4d8a8 --- /dev/null +++ b/arch/x86_64/proc/process.h @@ -0,0 +1,29 @@ +#ifndef _JOVE_x86_64_HAL_PROCESS_H +#define _JOVE_x86_64_HAL_PROCESS_H 1 + +#include "proc/process.h" +#include "arch/x86_64/x86_64.h" +#include "lib/rbtree.h" + +typedef struct process_control_block +{ + struct rbtree_node tree_node; + struct process_control_block *sched_next; + + pid_t pid; + jove_obj_t *rootdir; + jove_owned_obj_t *iopb; + 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 -- cgit v1.2.3