diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
| commit | 8251da342161767fe203627223ccd4a7026701c6 (patch) | |
| tree | af2db0f11b0ea8ad35f88663a855bab39a80f679 /arch/x86_64/hal/process.h | |
| download | jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.gz jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.bz2 jove-kernel-8251da342161767fe203627223ccd4a7026701c6.zip | |
initial commit. working on tasking
Diffstat (limited to 'arch/x86_64/hal/process.h')
| -rw-r--r-- | arch/x86_64/hal/process.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/x86_64/hal/process.h b/arch/x86_64/hal/process.h new file mode 100644 index 0000000..0c0fb5b --- /dev/null +++ b/arch/x86_64/hal/process.h @@ -0,0 +1,34 @@ +#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 |
