ioctl/unlocked_ioctl/compat_ioctl
来源:互联网 发布:战地1优化真的好 编辑:程序博客网 时间:2024/05/16 07:57
在kernel 2.6.35及之前的版本中struct file_opertation一共有3个ioctl:ioctl, unlocked_ioctl, compat_ioctl,
struct file_operations { int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long);...
在kernel 2.6.36中已经完全删除了struct file_operation中的ioctl指针,取而代之的是unlocked_ioctl。
struct file_operations { long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long);...
unlocked_ioctl与ioctl最大的不同是参数中少了inode,不过用户空间中ioctl对应的系统调用接口却没有变化,用户程序不需要改变。unlocked_ioctl最主要的改进是不再需要上大内核锁(调用之前不再先调用lock_kernel()然后再unlock_kernel()),内核的开发者试图朝移除大内核锁的方向努力。
compat_ioctl被用在用户空间为32位模式,而内核运行在64位模式时,这时候需要将64位转到32位。
0 0
- ioctl/unlocked_ioctl/compat_ioctl
- new way of ioctl --- unlocked_ioctl & compat_ioctl
- 关于ioctl,unlocked_ioctl和compat_ioctl执行的顺序
- 内核新的ioctl方式---- unlocked_ioctl和compat_ioctl
- 内核新的ioctl方式---- unlocked_ioctl和compat_ioctl
- 内核新的ioctl方式---- unlocked_ioctl和compat_ioctl
- 内核新的ioctl方式--unlocked_ioctl和compat_ioctl(解决error:unknown field 'ioctl' specified in initializer)
- unlocked_ioctl和compat_ioctl
- unlocked_ioctl和compat_ioctl
- unlocked_ioctl和compat_ioctl
- unlocked_ioctl和compat_ioctl
- ioctl compat_ioctl unlock_ioctl
- ioctl compat_ioctl与unlock_ioctl
- ioctl 变成了 unlocked_ioctl
- ioctl与unlocked_ioctl区别
- ioctl 变成了 unlocked_ioctl
- ioctl,unlocked_ioctl 处理方法
- ioctl与unlocked_ioctl区别
- 如何去除html代码标签之间换行产生的空格
- leetCode练习(54)
- Wordpress更换ip不能正常访问解决方法
- Web4之CSS选择器实验
- web.xml 中的listener、 filter、servlet 加载顺序及其详解
- ioctl/unlocked_ioctl/compat_ioctl
- ArrayList转数组,数组与ArrayList互相转换
- 使用JitPack发布Android开源库
- iwebshop_广告定点投放
- A64笔记
- Road
- linux驱动模型开发——linux platform总线机制讲解与实例开发
- C++ linux中文乱码
- java.lang.OutOfMemoryError: Java heap space异常