proc_dir_entry
struct proc_dir_entry {
unsigned int low_ino;
unsigned short namelen;
const char *name;
mode_t mode;
nlink_t nlink;
uid_t uid;
gid_t gid;
loff_t size;
const struct inode_operations *proc_iops;
const struct file_operations *proc_fops;
struct module *owner;
struct proc_dir_entry *next, *parent, *subdir;
void *data;
read_proc_t *read_proc;
write_proc_t *write_proc;
atomic_t count;
int pde_users;
spinlock_t pde_unload_lock;
struct completion *pde_unload_completion;
struct list_head pde_openers;
};
proc_file_operations->read->proc_file_read->read_proc
否则使用文件自己的file_operations中的read来读
具体请查看proc_register函数
proc_dir_entry的更多相关文章
- 发现struct proc_dir_entry内核3.10.17移到internal中去了,倒
struct proc_dir_entry 原:2.6.38.8 在#include <linux/proc_fs.h> 现:3.10.17 在fs/proc/internal.h:str ...
- linux内核调试技术之自构proc
1.简介 在上一篇中,在内核中使用printk可以讲调试信息保存在log_buf缓冲区中,可以使用命令 #cat /proc/kmsg 将缓冲区的数区的数数据打印出来,今天我们就来研究一下,自己写k ...
- android开发读书笔记
第九章心得: HAL ( Hardware Abstraction Layer,硬件抽象腔,〉是建立在Linux驱动之上的一套翻字库.这套程序 j率并不属于 Linux 内核, 而是属于 Linux ...
- Linux mips64r2 PCI中断路由机制分析
Linux mips64r2 PCI中断路由机制分析 本文主要分析mips64r2 PCI设备中断路由原理和irq号分配实现方法,并尝试回答如下问题: PCI设备驱动中断注册(request_irq) ...
- linux 使用/proc文件系统 实现用户空间与内核模块之间通信
项目中可能会用到用户态和内核模块之间进行通信的功能.想到linux系统本身很多通信都是通过/proc文件系统来的,比如修改网络中连接跟踪表连接数限制/proc/sys/net/netfilter/nf ...
- request_irq() | 注册中断服务函数【转】
本文转载自:http://blog.csdn.net/wealoong/article/details/7566546#t0 参考 : ARM Linux 中断机制分析.pdf linux-2.6. ...
- Linux 设备驱动程序 proc seq
不能再简化 #include<linux/module.h> #include<linux/init.h> #include<linux/seq_file.h> # ...
- Linux学习 :中断处理机制 & poll机制
中断是指在CPU正常运行期间,由于内外部事件或由程序预先安排的事件引起的CPU暂时停止正在运行的程序,转而为该内部或外部事件或预先安排的事件服务 的程序中去,服务完毕后再返回去继续运行被暂时中断的程序 ...
- Seq_file文件系统实例剖析
http://blog.chinaunix.net/uid-24432676-id-2607766.html 另 http://www.cnblogs.com/qq78292959/archive/2 ...
随机推荐
- 从零开始学ios开发(十一):Tab Bars和Pickers
不好意思各位,本人休息了一个礼拜,所以这次的进度延后了,而且这次的学习的内容比较多,时间用的也比较长,文章发布的时间间隔有些长了,望各位谅解,下面继续我们的ios之旅. 这次我们主要学习的内容有2个, ...
- inputstream与其他格式的转换
1.InputStream 转换成InputSource . InputStream inputStream = request.getInputStream(); InputSource input ...
- Notes of the scrum meeting(10/31)
meeting time:3:00~4:30p.m.,October 30th,2013 meeting place:绿园 attendees: 顾育豪 ...
- Java 8 VM GC Tunning Guide Charter 6
第六章 并行GC The Parallel Collector The parallel collector (also referred to here as the throughput coll ...
- 【转】获取android设备 id
关于本文档 Android的开发者在一些特定情况下都需要知道手机中的唯一设备ID.例如,跟踪应用程序的安装,生成用于复制保护的DRM时需要使用设备的唯一ID.在本文档结尾处提供了作为参考的示例代码片段 ...
- 百度快收录吧!!!a39fe054b88866bc737dd5fb02f39e41
百度快收录吧!!!a39fe054b88866bc737dd5fb02f39e41 }416oTemocleW{yek
- Luence简单实现1
初步认识Luence,简单按照官方文档做了个例子,大牛绕开,仅供小白路过参考.如有错误,欢迎指正批评. 建一个简单工程,并且加入这几个小奶瓶,如下图: 注:版本不同,可能对jdk的需求是不同的,这个需 ...
- 2693: jzptab - BZOJ
Description Input 一个正整数T表示数据组数接下来T行 每行两个正整数 表示N.MOutput T行 每行一个整数 表示第i组数据的结果Sample Input 1 4 5 Sampl ...
- myeclipse一直bulid workspace 的解决
解决方法转自: http://zhidao.baidu.com/link?url=gCj0XzorUUshtSFG2jXh6-Bxn28_LpcbTYasbgk9Qja_kw8Ex2kLzxFSYHN ...
- 剑指offer--面试题10--相关
题目一:判断一个整数是不是2的n次幂 实现大概如下: int main() { ; )) == ) //重要!! std::cout<<"YES!"<<st ...