Hi ,
I have a doubt regarding poll function in char driver . Let us consider following code
--------------------------------------------------------------------------------------
static unsigned int random_poll(struct file *file, poll_table * wait)
{
unsigned int mask;
poll_wait(file, &random_read_wait, wait);
poll_wait(file, &random_write_wait, wait);
mask = 0;
........
return mask;
}
read() / write()
{
wait_event_interuptable()
}
--------------------------------------------------------------------------------------
Does the above code (poll function) is in sleep state until both random_read_wait & random_write_wait are awakened ? . If i have use case If i want my user space application to poll only for read , then can i remove one of the above ?
--
With Regards,
ShankarGanesh K .
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and science."