Goal:
I want to implement a Linux kernel device driver, which includes the mmap file operation. I want to write a user space program (in C++), which uses the mmap system call to read/write to the device's memory.
What I (believe to) understand:
I read this (and other chapters of this book). The mmap file operation needs a filep. The user space program needs a file, which it can access. I know how to create a file in /dev/ by register_chrdev
, but I learned here, that this includes higher latency (which is what I try to avoid).
Question:
What is the correct way to create a filep for the file operation mmap, along with a file that is accessible by the mmap system call?