Re: poll device function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



aksingh@hss.hns.com wrote:



Hi,


  I am implementing a poll function for my char device, there is a standard
procedure of doing it,

1. poll_wait(give yr wait_queues address here);

2. then see if there is something to be read/write, set a mask and return
to user.

but here drivers dont seem to add the current process to the waitqueue,
before calling poll_wait, so does poll_wait does this for them ?

regards
Amit

yes exactly. poll_wait adds a wait queue in the pollwait table of the kernel. When an event occurs (write of data for example), the process is awaken.


-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux