是否可以mmap /dev/port?当我尝试的时候,我得到了“没有这样的设备”。Python 2.7.2+ (default, Oct 4 2011, 20:06:09) Type "help", "copyright", "credits" or "license" for more information.>>> impor
我目前正在一个Linux设备驱动程序中实现mmap()。struct test_dev{ struct mutex lock;};在设备的open()方法中,通过调用vmalloc()来分配data。假设我想让用户调用mmap()来映射到数据字段,用户需要知道offset of data字段:
int fd = op