반응형
BKL-free 관련 이슈로 ioctl 인터페이스가 2.6.35부터 변경되었다.
http://lwn.net/Articles/119652/ The new way of ioctl()
http://lwn.net/Articles/384855/ Might 2.6.35 be BKL-free?
http://lwn.net/Articles/406246/ BKL-free in 2.6.37 (maybe)
커널 버전에 따라 조건부 처리로 해결
https://bbs.archlinux.org/viewtopic.php?pid=862670
-
static struct file_operations fops = {
-
.owner = THIS_MODULE,
-
.read = irctl_read,
-
.write = irctl_write,
-
.poll = irctl_poll,
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
-
.ioctl = irctl_ioctl,
-
#else
-
.unlocked_ioctl = irctl_ioctl,
-
#endif
-
#ifdef CONFIG_COMPAT
-
.compat_ioctl = irctl_compat_ioctl,
-
#endif
-
.open = irctl_open,
-
.release = irctl_close
반응형
'【Fundamental Tech】 > → 🐧Kernel' 카테고리의 다른 글
Porting device drivers to the 2.6 kernel (0) | 2011.10.07 |
---|---|
4KB 섹터 디스크에서의 Linux: 실용적인 조언 (0) | 2011.10.07 |
Linux 2.6.20 APIs - Kernel/Filesystems (0) | 2011.10.03 |
아키텍처 별 Linux Kernel 분석용 ctags/cscope 태깅 정보 생성하기 (0) | 2011.10.03 |
[Macro] list_entry & offsetof (0) | 2010.08.11 |