linux源码剖析
文章平均质量分 62
别整没用的
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
源码剖析之poll
1. poll 从内核的角度看来,借助于VFS, 一切皆file// 文件表示 include/linux/fs.hstruct file { const struct file_operations *f_op; spinlock_t f_lock; // 文件内部实现细节 void *priv原创 2017-12-21 15:06:44 · 569 阅读 · 0 评论 -
源码剖析之wait queue
wait queue在内核中,一般使用等待队列(wait queue)实现当发生特定事件时的异步通知 具体方法如下: 1. 为每个特定的事件(可读、可写等)维护一个等待队列,本质上是一个双向链表 2. 关心该事件的实体作为等待队列中一项加入该等待队列中 3. 每个等待队列项包含关注该事件的实体的信息(进程、线程),以及回调函数 4. 当关注的事件发生时,会遍历相应的等待队列,调用每个节点中原创 2017-12-21 15:12:59 · 972 阅读 · 0 评论 -
源码剖析之epoll(1)
1. 源码剖析以下源码取自4.101.1 核心数据结构epitemfs/eventpoll.c/* * Each file descriptor added to the eventpoll interface will * have an entry of this type linked to the "rbr" RB tree. * Avoid increasing the size o原创 2017-12-21 18:25:37 · 266 阅读 · 0 评论 -
源码剖析之epoll(2)
1. 源码分析本篇主要分析epoll_ctl以及相关函数以下源码取自4.101.1 epoll_ctl用于添加/调整/删除我们要监视的事件fs/eventpoll.c/* * The following function implements the controller interface for * the eventpoll file that enables the insertion/原创 2017-12-22 15:05:27 · 499 阅读 · 0 评论 -
源码剖析之epoll(3)
1. 源码剖析本篇主要分析epoll_wait以及相关函数以下源码取自4.101.1 epoll_waitfs/eventpoll.c/* * Implement the event wait interface for the eventpoll file. It is the kernel * part of the user space epoll_wait(2). */SYSCALL原创 2017-12-26 16:06:39 · 304 阅读 · 0 评论
分享