kqueue for KBD.

Kohji Okuno okuno.kohji at jp.panasonic.com
Thu Feb 27 11:00:15 UTC 2014


Hi John-Mark,

Thank you for your comment.
I added knote_clear() and knote_destroy() in kbd_detach(). I attached
patch, again. But, maybe this patch can not resolve all cases you
pointed.

Regards,
 Kohji Okuno

> Kohji Okuno wrote this message on Thu, Feb 27, 2014 at 14:24 +0900:
>> I tried to add kqueue I/F to kbd.c. I attached patch.
>> What do you think about my patch?
> 
> So, knlist_destroy is missing in this patch too..
> 
> It also needs some style(9) loving in that some blank lines are missing
> and there are some extra curly braces...
> 
> So, knlist_clear is usually used for something like close where it
> cannot be used again...  You use knlist_clear when the kbd goes away,
> but this also means that the user will never be notified that the kbd
> has gone, and could possibly end up leaking resources...
> 
> I guess I should maybe write a function knlist_clearerr or something
> that detaches all the knotes from the knlist and sets the proper flag
> so that they can be reaped by userland...  I believe your usb patch
> had a similar issue and some of the other drivers have this issue too..
> 
> Otherwise looks good...
> 
> -- 
>   John-Mark Gurney				Voice: +1 415 225 5579
> 
>      "All that I will do, has been done, All that I have, has not."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kbd_kqueue-2.patch
Type: text/x-patch
Size: 3719 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20140227/7a16fb6e/attachment.bin>


More information about the freebsd-current mailing list