//进程控制块 structtask_struct { /* these are hardcoded - don't touch */ long state; /* -1 unrunnable, 0 runnable, >0 stopped */ long counter; long priority;/*优先级*/ long signal; structsigactionsigaction[32]; long blocked; /* bitmap of masked signals */
/* various fields */ int exit_code; unsignedlong start_code,end_code,end_data,brk,start_stack; long pid,father,pgrp,session,leader; unsignedshort uid,euid,suid; unsignedshort gid,egid,sgid; long alarm; long utime,stime,cutime,cstime,start_time; unsignedshort used_math;
/* file system info */ int tty; /* -1 if no tty, so it must be signed */ unsignedshort umask; structm_inode * pwd; structm_inode * root; structm_inode * executable; unsignedlong close_on_exec; structfile * filp[NR_OPEN];
/* ldt for this task 0 - zero 1 - cs 2 - ds&ss */ structdesc_structldt[3]; /* tss for this task */ structtss_structtss; };