mmap
Hi all,
can anyone tell me how to implement mmap function.. with some sample application code..?? thanks... |
This is some older code - note the open flags on the file. You cannot write the buffer back to the file without closing the fd first
Code:
/****************************** |
sorry... repeated...
|
wow thanks a lot jim mcnamara...
I am thinking of implementing mmap system call in my driver. I need to map kernal buffer which is allocated by kmalloc to user space. I am able to map the buffer area but i could not read from that buffer in the user space....Will u please in this regard with a sample code of driver. thanks again.... |
If what I posted is news to you, then writing kernel mode code or drivers may also be interesting for you.
Have you considered reading 'Linux Device Drivers' by Corbet, Rubini & Kroah-Hartman? Or some other primary material like that? Using mmap is covered in http://www.advancedlinuxprogramming.com/alp-folder Advanced Linux Programming - a free online book. |
thanks jim mcnamara...
ya ya i have referred the same book, linux device drivers by Rubini.. i have implemented the code referring to that book.. but when is try to read the data from the user space i am not getting the actual data..that is the problem.... and also in the link given the only application code is implemented... so i am searching the driver side code for that...can u help me ??? |
All times are GMT -5. The time now is 02:09 AM. |