МоёМесто

Сохраненная страница linux - Writing to eventfd from kernel module - Stack Overflow (82 Kb)

Here is what I want to do: I am developing a userspace program which needs to exchange data and signals with a kernel space module which I have written. For transferring data, I am already using ioctl. But I want the kernel module to be able to signal the userspace program whenever new data is ready for it to consume over ioctl. To do this, my userspace program will create a few eventfds in various threads. These threads will wait on these eventfds using select() and whenever the kernel module updates the counts on these eventfds, they will go on to consume the data by requesting for it over ioctl.

скачать