Chinaunix首页 | 论坛 | 博客
  • 博客访问: 962501
  • 博文数量: 109
  • 博客积分: 554
  • 博客等级: 中士
  • 技术积分: 2577
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-04 12:49
文章分类

全部博文(109)

文章存档

2019年(5)

2016年(7)

2015年(9)

2014年(1)

2013年(71)

2012年(16)

分类: 嵌入式

2013-06-20 11:54:21

ioctl 在2.6.36被移除
老接口:
int (*ioctl)(struct inode *node, structfile *filp, unsigned int cmd, unsigned long arg)
新接口:
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);

原因:
当ioctl被执行时,它使用big kernel lock (BKL),其他的事情将不能被执行,这种情况在多核系统上更糟糕,
所以内核开发人员努力移除BKL。首先unlocked_ioctl 被引入到内核,它可以让驱动开发人员选择其他的替换lock,

campat_ioctl 实际与上面问题无关,引入它的目的是允许32位的用户程序可以在64位内核调用ioctl

阅读(1775) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~