Re: Implementation of poll() and the poll_table in a device driver

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

 



On Friday 28 January 2005 11:14, Bahadir Balban wrote:
> Hi,
>
> I'm asking this in context of a simple device driver. In the general
> implementation of poll(), the wait_queue's in the driver that can
> wake up the current process and change the current poll condition are
> added to a poll_table via poll_wait().
>
> Why do we need this? If I was to implement poll() I would simply
> check the status of the driver and return the result, and if some
> other process would change the poll condition of the device, in my
> thinking this would be resolved in the next poll() call.

I think you may be confusing poll() the system call with polling in a 
hardware sense.  poll() just doesn't check for pending data and then 
return.  It will also block if none of the poll conditions are true.

--
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