- /*
- By Marcus Xing
- include/global.h
- 包含全局变量的声明
- */
- /*
- forward include:
- type.h
- const.h
- protect.h
- proc.h
- console.h
- tty.h
- */
- #ifndef _GLOBAL_H_
- #define _GLOBAL_H_
- extern u8 GDT_Ptr[6]; /* GDTR的6字节填充值 */
- extern Descriptor GDT[GDT_SIZE]; /* GDT的结构数组,有GDT_SIZE个Descriptor */
- extern u8 IDT_Ptr[6]; /* IDTR的6字节填充值 */
- extern Gate IDT[IDT_SIZE]; /* IDT的结构数组,有IDT_SIZE个Gate */
- extern u32 d_Disp_Pos; /* 显示位置 */
- extern TSS tss; /* TSS,低特权级的段跳转到高特权级的段使用 */
- extern PCB PCB_Table[MAX_PROC]; /* PCB表 */
- extern PCB* p_Next_PCB; /* 指向下一个运行的进程的PCB */
- extern int d_Flag_Reenter; /* 判断是否中断重入 */
- extern u32 d_Cur_Proc_Num; /* 当前进程的个数 */
- /* 各个进程的堆栈空间 */
- extern u8 All_Proc_Stack_Space[ALL_PROC_STACK_SPACE];
- /* 进程的与众不同的部分的表 */
- extern Proc_Unique Proc_Unique_Table[MAX_PROC];
- /* 记录是否是系统进程的表 */
- extern int Is_System_Proc[MAX_PROC];
- /* 外中断处理程序的表,共16个 */
- extern IRQ_Handler IRQ_Handler_Table[IRQ_NUM];
- /* 系统调用处理函数表,共3个 */
- extern System_Call_Handler System_Call_Handler_Table[SYSTEM_CALL_HANDLER_NUM];
- /* Ticks,沒发生一次时钟中断,自增1,无论是否重入 */
- extern int d_Ticks;
- /* TTY表 */
- extern TTY TTY_Table[TTY_NUM];
- /* Console表 */
- extern Console Console_Table[TTY_NUM];
- extern int Current_Console; /* 当前的控制台 */
- #endif