poll_wait
it is some code related to poll implementation in linux device drivers.
************************
unsigned int scull_p_poll(struct file *filp ,
poll_table *wait)
{
int mask ;
poll_wait(filp,&wait_queue1 ,wait);
poll_wait(filp ,&wait_queue2 ,wait);
if(readable) mask|=POLLIN | POLLRDNORM;
if(writable)
mask|=POLLOUT | POLLWRNORM;
**********************************
poll method is used to check whether a operation will succed before actually calling it .
So , what is the need for poll_wait() ? .
we have to check only condition for readability or writability and return corresponding mask .
what does poll_wait() realy do?
|