kern

view src/proc.h @ 47:f65b348780e3

continuing with the process implementation. not done yet, panics.
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 28 Jul 2011 05:43:04 +0300
parents 5f6c5751ae05
children b1e8c8251884
line source
1 #ifndef PROC_H_
2 #define PROC_H_
4 #include <inttypes.h>
5 #include "asmops.h"
7 #define MAX_PROC 128
9 struct context {
10 struct registers regs; /* saved general purpose registers */
11 uint32_t instr_ptr; /* saved eip */
12 uint32_t stack_ptr; /* saved esp */
13 uint32_t flags; /* saved eflags */
14 uint32_t pgtbl_paddr; /* physical address of the page table */
15 /* TODO add FPU state */
16 };
19 struct process {
20 int parent;
21 struct context ctx;
22 };
24 void init_proc(void);
26 void context_switch(int pid);
28 #endif /* PROC_H_ */