struct task_struct *pidhist_next;
struct task_struct *pidhist_pprev; /* 上面两个指针是为了在计算机中快速查
一个进程而设立,具体方式以后讲*/
wait_queue_head_t wait_chldexit;
struct completion *vfork_sem;
unsigned long 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;
struct tms times;
struct tms group_times;
unsigned long start_time;
long per_cpu_utime[NR_CPUS], per_cpu_stime[NR_CPUS];
unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
uid_t uid,euid,suid,fsuid;
gid_t gid,egid,sgid,fsgid;
int ngroups;
gid_t groups[NGROUPS];
kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
int keep_capabilities:1;
struct user_struct *user;
struct rlimit rlim[RLIM_NLIMITS];
unsigned short used_math;
char comm[16];
int link_count;
struct tty_struct *tty; /* NULL if no tty */
unsigned int locks; /* How many file locks are being held */
struct sem_undo *semundo;
struct sem_queue *semsleeping;
int do_fork(unsigned long clone_flags, unsigned long stack_start,
struct pt_regs, unsigned long stack_size)
{
int retval = -ENOMEN;
struct task_struct *p;
DECLARE_MUTEX_LOCKED(sem);