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 ...
随机推荐
- glog使用
How To Use Google Logging Library Glog 的基本使用方法在google code上有介绍:How To Use Google Logging Library ;最好 ...
- iOS 系统二维码扫描(可限制扫描区域)
使用 AVFoundation系统库来进行二维码扫描并且限制扫描二维码的范围.(因为默认的是全屏扫描) -(void)beginCode { //1.摄像头设备 AVCaptureDevice *de ...
- ubuntu12.04samba服务器配置,亲测可用(转)
系统平台:VMware Workstation9.0 + ubuntu12.04 首先要解决windows和linux网络连接问题:在VMware Workstation9.0 “设置” 选项中,设置 ...
- python学习小结3:函数
Python是对接口编程,而不是对数据类型编程.例如我们定义了一个函数,在函数里用到了in这个接口,那么只要传入的参数实现了这个接口就可以,我们不在乎它是list还是tuple. 简单的函数 使用de ...
- 使用libuv实现生产者和消费者模式
生产者和消费者模式(Consumer + Producer model) 用于把耗时操作(生产线程),分配给一个或者多个额外线程执行(消费线程),从而提高生产线程的响应速度(并发能力) 定义 type ...
- Ubuntu多系统安装注意事项
1. 安装 选择分区时一定要全设置成逻辑分区,不能是主分区! 2.多系统引导向修复 利用LiveCD制作U盘启动进入Ubuntu系统,若挂载点为: /dev/sda9 swap ...
- sql replace
update dbo.EquipmentAttribute set AttributeName=replace(AttributeName,' ','') where EquipmentID=8 ...
- C++对MS SQL Server的操作
今天因为在做一份C++的期末作业,突然想用C++来链接数据库,实现数据的重复利用,所以就作死去百度搜了一下. 更巧的事情是,一搜居然还有很多搜索结果,然后就照着做了. 做的过程很艰辛,就不一一诉说了, ...
- AngularJs遇到的小坑与技巧
1. templateURL和路由之类的要在web server下运行. 2. 使用模板replace设为true,模板里也要有相应的标签,否则不出现任何数据. 3. 1.2版本之后,ngRoute模 ...
- Codeforces Round #343 (Div. 2) E. Famil Door and Roads
题目链接: http://www.codeforces.com/contest/629/problem/E 题解: 树形dp. siz[x]为x这颗子树的节点个数(包括x自己) dep[x]表示x这个 ...