我正在为字符设备驱动程序编写基本的设备驱动程序模块。我想要这样的行为:当我使用cat /dev/scull从设备文件中读取时,我应该得到设备打开的次数。我遇到的问题是阅读功能 int x; /*Private data members*/
struct cdev cdev;/*This is character device
在LDD3 (Linux设备驱动程序第三版)的scullpipe中,static int scull_read_p_mem(char *buf, char **start, off_t offset,关于实际实现本身,我有一些问题(可以在下面找到): wait_queue_head_t inq, outq; /* read and; /* the number of scull_