file_operations结构体介绍 (三)

2014-11-24 03:23:30 · 作者: · 浏览: 2
ng (*get_unmapped_area)(struct file *, unsignedlong, unsigned long, unsigned long, unsigned long);

这个方法的目的是在进程的地址空间找一个合适的位置来映射在底层设备上的内存段中.

这个任务通常由内存管理代码进行;这个方法存在为了使驱动能强制特殊设备可能有的任

何的对齐请求.大部分驱动可以置这个方法为NULL.[

23.int (*check_flags)(int)

这个方法允许模块检查传递给fnctl(F_SETFL...) 调用的标志.

24.int (*dir_notify)(struct file *, unsigned long);

这个方法在应用程序使用fcntl 来请求目录改变通知时调用.只对文件系统有用;驱动不需要

实现dir_notify.