lkml.org 
[lkml]   [2004]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: poll() in 2.6 and beyond
From
Date
    Richard> Poll in 2.6.0; when a driver routine calls poll_wait() it
Richard> returns <<immediately>> to somewhere in the kernel, then
Richard> waits for my wake_up_interuptible(), before returning
Richard> control to a user sleeping in poll(). This means that the
Richard> user gets the wrong poll return value! It doesn't get the
Richard> value it was given as a result of the interrupt, but the
Richard> value that existed (0) before the interrupt occurred.

Nothing has changed in 2.6 that I know of. poll_wait() always
returned immediately to the driver. The driver's poll method is
supposed to call poll_wait() on the wait queues that indicate a change
in poll status, and then return with the current status.

Read the description of "poll and select" in LDD:
<http://www.xml.com/ldd/chapter/book/ch05.html#t3>

- Roland

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.214 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site