Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Aug 2008
poll_wait( ) is not waiting in the driver
I am writing a simple char device driver on 2.6.28 linux kernel, in which it needs a polling feature implemented.
I have created device's poll method as in the LDD book:
unsigned int scull_p_poll(struct file *filp, poll_table *wait)
poll_wait(filp, &dev->inq, wait);
poll_wait(filp, &dev->outq, wait);
As per documentation : when user application tries to poll on this char device, driver's poll method gets called and poll_wait( ) gets called to add the current process to wait_queue(which was already defined).
So, when there is any data to read or write, we can call wake_up( ) syscall to wakeup the process.
But, that is not happening as it is document. poll_wait() is not waiting for any wake_up call. It is just returning out without waiting.
Could you please help me in developing polling feature for the char device driver?