①atomic_t
typedef struct { volatile int counter; } atomic_t;
就是一个原子计数器
②user_struct
注意:user_struct 是对于一个用户来说的.
struct user_struct {
atomic_t __count; /* reference count */ //不知道有什么用
atomic_t processes; /* How many processes does this user have? */
atomic_t files; /* How many open files does this user have? */
/* Hash table maintenance information */
struct list_head uidhash_list; //这个应该就是users的一个链表
uid_t uid;
};
网友评论