poll_wait - wait for selectable event to be ready
void poll_wait(structwait_queue**sync, poll_table*pt))
This function is used in support of the poll device driver
entry point. The intent is for a device driver to put sync
into the poll table immediately upon entering the device
poll routine, then return a bit mask of events that are
currently ready. The kernel looks at the mask of events to
see if something it needs is ready, and suspends the process
static unsigned int xxpoll(struct file*file, poll_table*pt)
if (data_in.cnt > 0) return POLLIN | POLLRDNORM;
else return 0;
This example shows the basic use of poll_wait(9) in a device
driver poll function.
Linux kernel 2.1.34+
Stephen Williams <email@example.com>
To early to say.