美文网首页
Linux源码解析①

Linux源码解析①

作者: speakspeak | 来源:发表于2019-04-21 19:10 被阅读0次

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

};

相关文章

网友评论

      本文标题:Linux源码解析①

      本文链接:https://www.haomeiwen.com/subject/ovwjgqtx.html