> Kohji Okuno wrote this message on Fri, Feb 28, 2014 at 11:13 +0900:
>> I have a question about kevent.
>> How should the userland judge knote which is cleared from knlist by
>> knlist_clear() or knlist_delete()?
> It looks like I need to read the code better...  knlist_clear (killkn=0)
> and knlist_delete (killkn=1) are wrappers around knlist_cleardel...
> Looking at the code of knlist_cleardel, if killkn is set
> (knlist_delete) the knote will be dropped (free'd)... if it is not set,
> the flags _EOF and _ONESHOT will be set such that it'll be returned
> soon..
> Now that I look at the code, KNOTE_ACTIVATE is never called to be put
> on the list to be delivered, so now I'm not sure if it works the way
> it's suppose to... I have a feeling that the notes might hang around
> forever until the kq fd is closed...
> I'm also puzzled as to why _DETACHED isn't set, which would seem to
> mean that we'll call f_detach when we close the kq, which I assume
> could cause a panic...
> This needs to be investigated/tested...
> -- 
>   John-Mark Gurney                            Voice: +1 415 225 5579
>      "All that I will do, has been done, All that I have, has not."


Thank you for your comment.

I tried test by usb_dev. When a USB device is lost suddenly, I can
receive EV_EOF|EV_ONESHOT on kevent->flags.

 Kohji Okuno
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to