Linux源码解析①

2019-04-21  本文已影响0人  speakspeak

①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;     

};

上一篇 下一篇

猜你喜欢

热点阅读