📄 q.h
字号:
#define INIT_COUNTER 300#define __KERNEL_CS 1<<3#define __KERNEL_DS 2<<3struct pt_regs { long ebx; long ecx; long edx; long esi; long edi; long ebp; long eax; int xds; int xes; long orig_eax; long eip; int xcs; long eflags; long esp; int xss;};struct task_struct{ int x,z; int state; int pid; int pptr, cptr; // parent, child struct mm_struct * mm; // memory //struct FilePtr * fd[20]; // max 20 files opened per process struct task_struct * next_task, * prev_task; // process queue struct task_struct * next_run, * prev_run; // run queue long esp; // stack top int y; long esp0; // stack top for tss long eip; // stopped location long counter; // time quantum int need_reschedule;};union task_union{ struct task_struct task; long stack[2048];}; // 8192 byte for a process#define IO_BITMAP_SIZE 32struct tss_struct{ unsigned short back_link, __blh; unsigned long esp0; unsigned short ss0, __ss0h; unsigned long esp1; unsigned short ss1,__ss1h; unsigned long esp2; unsigned short ss2,__ss2h; unsigned long __cr3; unsigned long eip; unsigned long eflags; unsigned long eax,ecx,edx,ebx; unsigned long esp; unsigned long ebp; unsigned long esi; unsigned long edi; unsigned short es, __esh; unsigned short cs, __csh; unsigned short ss, __ssh; unsigned short ds, __dsh; unsigned short fs, __fsh; unsigned short gs, __gsh; unsigned short ldt, __ldth; unsigned short trace, bitmap; unsigned long io_bitmap[IO_BITMAP_SIZE+1]; unsigned long __cacheline_filler[5];};struct desc_struct{ unsigned long a,b;};extern union task_union process_table[];extern union task_union * init_task_union;extern struct task_struct * current;extern struct task_struct * init_task;extern struct task_struct * process_q_head;extern struct task_struct * process_q_tail;extern struct task_struct * run_q_head;extern struct task_struct * run_q_tail;extern struct task_struct * p1;extern struct task_struct * p2;extern struct tss_struct init_tss;extern struct desc_struct GDT[];extern void p1_body(struct pt_regs regs);extern void p2_body();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -