#ifndef KPROCESS_H #define KPROCESS_H #include #include #define MAX_PROCESS_FDS 32 typedef enum { STATE_READY = 1, STATE_SLEEPING = 2, STATE_BLOCKED = 3, STATE_DEAD = 4, } process_state_t; typedef enum { PROCESS_FLAG_NONE = 0, PROCESS_FLAG_KERNEL = 1 << 0, PROCESS_FLAG_USER = 1 << 1 } process_flags_t; struct process_t; typedef struct process_t { uint32_t pid; uint32_t esp; uint32_t kstack_top; uint32_t cr3; process_state_t state; uint32_t sleep; uint32_t heap_end; uint32_t flags; file_t* fd_table[MAX_PROCESS_FDS]; struct process_t* sched_next; } __attribute__((packed)) process_t; #endif