Linux源码解析——进程结构
2019-04-21 本文已影响0人
speakspeak
注意:采用慢慢添加的方法进行记录
struct task_struct {
volatile long state; //进程的状态,其值的选择见TASK宏
struct task_struct *parent; /* parent process */
struct list_head children; /* list of my children */
struct list_head sibling; /* linkage in my parent's children list */
struct list_head tasks; /*all tasks*/
struct user_struct *user; //用户的状态,包括进程数,打开文件数
struct rlimit rlim[RLIM_NLIMITS]; //进程的各种限制,包括进程的最大个数。详见RLIMIT宏
};