Linux 核心--16.Linux数据结构( 八 )


 *p_ysptr, *p_osptr;
struct wait_queue*wait_chldexit;
unsigned short uid,euid,suid,fsuid;
unsigned short gid,egid,sgid,fsgid;
unsigned longtimeout, policy, rt_priority;
unsigned longit_real_value, it_prof_value, it_virt_value;
unsigned longit_real_incr, it_prof_incr, it_virt_incr;
struct timer_listreal_timer;
long utime, stime, cutime, cstime, start_time;
/* mm fault and swap info: this can arguably be seen as either
 mm-specific or thread-specific */
unsigned longmin_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
unsigned longswap_address;
unsigned longold_maj_flt;/* old value of maj_flt */
unsigned longdec_flt;/* page fault count of the last time */
unsigned longswap_cnt; /* number of pages to swap on next pass */
/* limits */
struct rlimitrlim[RLIM_NLIMITS];
unsigned short used_math;
char comm[16];
/* file system info */
intlink_count;
struct tty_struct*tty; /* NULL if no tty */
/* ipc stuff */
struct sem_undo*semundo;
struct sem_queue *semsleeping;
/* ldt for this task - used by Wine.If NULL, default_ldt is used */
struct desc_struct *ldt;
/* tss for this task */
struct thread_struct tss;
/* filesystem information */
struct fs_struct *fs;
/* open file information */
struct files_struct*files;
/* memory management info */
struct mm_struct *mm;
/* signal handlers */
struct signal_struct *sig;
#ifdef __SMP__
intprocessor;
intlast_processor;
intlock_depth; /* Lock depth.
We can context switch in and out
of holding a syscall kernel lock... */
#endif
};

timer_list
用来为进程实现实时时钟 。

struct timer_list {
struct timer_list *next;
struct timer_list *prev;
unsigned long expires;
unsigned long data;
void (*function)(unsigned long);
};

tq_struct
每个任务队列结构(tq_struct)包含着已经排队的任务信息 。它被设备驱动用来描叙那些无需立刻 执行的任务 。

struct tq_struct {
struct tq_struct *next; /* linked list of active bh"s */
int sync; /* must be initialized to zero */
void (*routine)(void *);/* function to call */
void *data; /* argument to function */
};

vm_area_struct
表示某进程的一个虚拟内存区域 。

struct vm_area_struct {
struct mm_struct * vm_mm;/* VM area parameters */
unsigned long vm_start;
unsigned long vm_end;
pgprot_t vm_page_prot;
unsigned short vm_flags;
/* AVL tree of VM areas per task, sorted by address */
short vm_avl_height;
struct vm_area_struct * vm_avl_left;
struct vm_area_struct * vm_avl_right;
/* linked list of VM areas per task, sorted by address */
struct vm_area_struct * vm_next;
/* for areas with inode, the circular list inode->i_mmap */
/* for shm areas, the circular list of attaches */
/* otherwise unused */
struct vm_area_struct * vm_next_share;
struct vm_area_struct * vm_prev_share;
/* more */
struct vm_operations_struct * vm_ops;
unsigned long vm_offset;
struct inode * vm_inode;
unsigned long vm_pte;/* shared mem */
};

推荐阅读