kqueue for KBD.

John-Mark Gurney jmg at funkthat.com
Thu Feb 27 06:18:41 UTC 2014


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


More information about the freebsd-current mailing list