Subject: Re: device driver poll() example
To: None <tech-kern@netbsd.org>
From: Ian Zagorskih <ianzag@megasignal.com>
List: tech-kern
Date: 08/20/2004 11:03:05
On Thursday 19 August 2004 23:29, Chapman Flack wrote:
>
> afaiu, in poll() you check the requested flags against anything you can
> deliver, and you set the returned flags for whatever matched.  If anything
> matched you just return.  If nothing matched, you use selrecord to remember
> the process, and then just return; the kernel routine that called you will
> take care of blocking that process if it wanted to be blocked.
>
> In your interrupt service routine if something good has happened, you use
> selwakeup to let any waiting process know.  More details from the examples.
>
> selrecord and selwakeup did not seem to have man pages until last February:
>   http://netbsd.gw.com/cgi-bin/man-cgi?selwakeup
> and that might mean that stuff is changing for 2.0.  The man page says that
> selnotify is now preferred to selwakeup, and selnotify seems to hook into
> the new kqueue kernel event stuff, about which I plead ignorance for now.

Thank you ! man selwakeup really helps :) For -current it's in man pages.

// wbr