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 ...
随机推荐
- 从零单排学JavaWeb
之前是一个asp爱好者,感觉前途渺茫,特此转向Powerful的Java阵型,寻求心灵上的慰藉. 把自己遇到的问题记录下来,同时也分享给大家. 环境-下载 1 JDK http://dlsw.bai ...
- Redis 三:存储类型之字符串
.赋值单个: [赋值多个:mset a b c ] .取值单个: get a [取值多个:mget a b c] .数字递增 incr a 在a的基础上+,那就是返回101 如果预先的值为0,那么返回 ...
- oracle 存储过程编辑 卡死
一.可用SYS登录, 二.查锁session_ID查找存储过程OPERATIONDATA_IMP被哪些session锁住而无法编译select * FROM dba_ddl_locks where n ...
- 【http】生命周期和http管道技术 整理中
httpModules 与 httpHandlers 正在写demo public class Httpext : IHttpModule { public void Dispose() { thr ...
- [转] c和python利用setsockopt获得端口重用
假如端口被socket使用过,并且利用socket.close()来关闭连接,但此时端口还没有释放,要经过一个TIME_WAIT的过程之后才能使用.为了实现端口的马上复用,可以选择setsockopt ...
- DataGridView 使用CheckBox选中行
在winform中使用checbox很多.上次那个项目里就用到了,写了一个不太好用,后来翻阅了一下微软提供的样码,我觉得有必要给大家分享一下. // This event handler manual ...
- STL学习二:Vector容器
1.Vector容器简介 vector是将元素置于一个动态数组中加以管理的容器. vector可以随机存取元素(支持索引值直接存取, 用[]操作符或at()方法,这个等下会详讲). vector尾部添 ...
- LintCode-Word Search II
Given a matrix of lower alphabets and a dictionary. Find all words in the dictionary that can be fou ...
- 原生js实现仿window10系统日历效果
舞动的灵魂版js日历,完全采用js实现,故而实现了与语言无关,jsp.asp.net php asp均可使用.无论你是开发软件,还是网站,均是不可或缺的实用代码. 该日历主要实现了获取当前时间时分秒, ...
- html利用锚点实现定位代码实例
本章节介绍介绍一下如何利用锚点实现定位,使用锚点实现定位是html固有的功能,当然比较简单,也实现了基本的功能,但是功能相对简单一些,如果想要实现平滑的定位可以参阅jquery实现的点击页面动画方式平 ...