Hello, I was trying to write a program in which I wanted to transfer some data from the kernel to the user and back. I felt that it would be a clean implementation to have a shared memory across the kernel and user process to transfer the data in chunks. I also found that you can use the mmap function to get the required sharing. But then now I need a counting semaphore to keep track of the amount of data to be transffered. The kernel can increment the semaphore value to the number of chunks to be transffered and the user process can sleep on this semaphore. Can someone provide some insight(function calls to be used etc.) into how to implement this semaphore across the kernel and user program. Any suggestion/questions/comments are welcome. Also I would be glad to hear about any material you think is appropriate for the task. Cheers -Pradeep -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/