Results 1 to 1 of 1
Hello All,
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 ...
- 06-09-2011 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 13
poll_wait( ) is not waiting in the driver
Hello All,
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);
.....
return mask;
}
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?


Reply With Quote
