nuclear@29: #ifndef PROC_H_ nuclear@29: #define PROC_H_ nuclear@29: nuclear@43: #include nuclear@42: #include "asmops.h" nuclear@42: nuclear@42: #define MAX_PROC 128 nuclear@42: nuclear@42: struct context { nuclear@47: struct registers regs; /* saved general purpose registers */ nuclear@47: uint32_t instr_ptr; /* saved eip */ nuclear@47: uint32_t stack_ptr; /* saved esp */ nuclear@47: uint32_t flags; /* saved eflags */ nuclear@47: uint32_t pgtbl_paddr; /* physical address of the page table */ nuclear@42: /* TODO add FPU state */ nuclear@42: }; nuclear@42: nuclear@29: nuclear@29: struct process { nuclear@47: int parent; nuclear@42: struct context ctx; nuclear@29: }; nuclear@29: nuclear@47: void init_proc(void); nuclear@47: nuclear@47: void context_switch(int pid); nuclear@47: nuclear@29: #endif /* PROC_H_ */