[b]struct task_struct{[/b]
/* these are hardcoded - don't touch */
[b] volatile long state; [/b] /* -1 unrunnable, 0 runnable, >0 stopped */
[b] long counter;[/b]
[b]long priority;[/b]
[b]unsigned long signal;[/b]
[b]unsigned long blocked;[/b] /* bitmap of masked signals */
[b] unsigned long flags;[/b] /* per process flags, defined below */
[b] int errno;[/b]
[b]
long debugreg[8]; [/b] /* Hardware debugging registers */
[b]struct exec_domain *exec_domain;[/b]
/* various fields */
[b] struct linux_binfmt *binfmt;[/b]
[b] struct task_struct *next_task, *prev_task;[/b]
[b] struct task_struct *next_run, *prev_run;[/b]
[b] unsigned long saved_kernel_stack;[/b]
[b] unsigned long kernel_stack_page;[/b]
[b]int exit_code, exit_signal;[/b]
/* ??? 这里的注释不知道是什么?*/
[b]unsigned long personality;[/b]
[b]int dumpable:1;[/b]
[b]int did_exec:1;[/b]
[b] int pid;[/b]
[b]int pgrp;[/b]
[b] int tty_old_pgrp;[/b]
[b] int session;[/b]
/* boolean value for session group leader */
[b]int leader;[/b]
[b]int groups[NGROUPS];[/b]
/*
* pointers to (original) parent process, youngest child, younger sibling,
* older sibling, respectively. (p->father can be replaced with
* p->p_pptr->pid)
*/
[b]struct task_struct *p_opptr, *p_pptr, *p_cptr,
*p_ysptr, *p_osptr;[/b]
[b]struct wait_queue *wait_chldexit;
unsigned short uid,euid,suid,fsuid;
unsigned short gid,egid,sgid,fsgid;
unsigned long timeout, policy, rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
struct timer_list real_timer;
long utime, stime, cutime, cstime, start_time;[/b]
/* mm fault and swap info: this can arguably be seen as either
mm-specific or thread-specific */
[b]unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
unsigned long swap_address;
[/b]
[b]unsigned long old_maj_flt;[/b] /* old value of maj_flt */
[b] unsigned long dec_flt;[/b] /* page fault count of the last time */
[b]unsigned long swap_cnt; [/b] /* number of pages to swap on next pass */
/* limits */
[b]struct rlimit rlim[RLIM_NLIMITS];
unsigned short used_math;
char comm[16];[/b]
/* file system info */
[b]int link_count;
struct tty_struct *tty; [/b] /* NULL if no tty */
/* ipc stuff */
[b] struct sem_undo *semundo;
struct sem_queue *semsleeping;[/b]
/* ldt for this task - used by Wine. If NULL, default_ldt is used */
[b] struct desc_struct *ldt;[/b]
/* tss for this task */
[b] struct thread_struct tss;[/b]
/* filesystem information */
[b] struct fs_struct *fs;[/b]
/* open file information */
[b]struct files_struct *files;[/b]
/* memory management info */
[b]struct mm_struct *mm;[/b]
/* signal handlers */
[b] struct signal_struct *sig;[/b]
[b]#ifdef __SMP__
int processor;
int last_processor;
int lock_depth; [/b] /* Lock depth.
We can context switch in and out
of holding a syscall kernel lock... */
[b]#endif
};[/b]
/* these are hardcoded - don't touch */
[b] volatile long state; [/b] /* -1 unrunnable, 0 runnable, >0 stopped */
[b] long counter;[/b]
[b]long priority;[/b]
[b]unsigned long signal;[/b]
[b]unsigned long blocked;[/b] /* bitmap of masked signals */
[b] unsigned long flags;[/b] /* per process flags, defined below */
[b] int errno;[/b]
[b]
long debugreg[8]; [/b] /* Hardware debugging registers */
[b]struct exec_domain *exec_domain;[/b]
/* various fields */
[b] struct linux_binfmt *binfmt;[/b]
[b] struct task_struct *next_task, *prev_task;[/b]
[b] struct task_struct *next_run, *prev_run;[/b]
[b] unsigned long saved_kernel_stack;[/b]
[b] unsigned long kernel_stack_page;[/b]
[b]int exit_code, exit_signal;[/b]
/* ??? 这里的注释不知道是什么?*/
[b]unsigned long personality;[/b]
[b]int dumpable:1;[/b]
[b]int did_exec:1;[/b]
[b] int pid;[/b]
[b]int pgrp;[/b]
[b] int tty_old_pgrp;[/b]
[b] int session;[/b]
/* boolean value for session group leader */
[b]int leader;[/b]
[b]int groups[NGROUPS];[/b]
/*
* pointers to (original) parent process, youngest child, younger sibling,
* older sibling, respectively. (p->father can be replaced with
* p->p_pptr->pid)
*/
[b]struct task_struct *p_opptr, *p_pptr, *p_cptr,
*p_ysptr, *p_osptr;[/b]
[b]struct wait_queue *wait_chldexit;
unsigned short uid,euid,suid,fsuid;
unsigned short gid,egid,sgid,fsgid;
unsigned long timeout, policy, rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
struct timer_list real_timer;
long utime, stime, cutime, cstime, start_time;[/b]
/* mm fault and swap info: this can arguably be seen as either
mm-specific or thread-specific */
[b]unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
unsigned long swap_address;
[/b]
[b]unsigned long old_maj_flt;[/b] /* old value of maj_flt */
[b] unsigned long dec_flt;[/b] /* page fault count of the last time */
[b]unsigned long swap_cnt; [/b] /* number of pages to swap on next pass */
/* limits */
[b]struct rlimit rlim[RLIM_NLIMITS];
unsigned short used_math;
char comm[16];[/b]
/* file system info */
[b]int link_count;
struct tty_struct *tty; [/b] /* NULL if no tty */
/* ipc stuff */
[b] struct sem_undo *semundo;
struct sem_queue *semsleeping;[/b]
/* ldt for this task - used by Wine. If NULL, default_ldt is used */
[b] struct desc_struct *ldt;[/b]
/* tss for this task */
[b] struct thread_struct tss;[/b]
/* filesystem information */
[b] struct fs_struct *fs;[/b]
/* open file information */
[b]struct files_struct *files;[/b]
/* memory management info */
[b]struct mm_struct *mm;[/b]
/* signal handlers */
[b] struct signal_struct *sig;[/b]
[b]#ifdef __SMP__
int processor;
int last_processor;
int lock_depth; [/b] /* Lock depth.
We can context switch in and out
of holding a syscall kernel lock... */
[b]#endif
};[/b]