Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 2014 22:18:40 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Kohji Okuno <okuno.kohji@jp.panasonic.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: kqueue for KBD.
Message-ID:  <20140227061840.GB47921@funkthat.com>
In-Reply-To: <20140227.142445.47188371497615592.okuno.kohji@jp.panasonic.com>
References:  <20140227.142445.47188371497615592.okuno.kohji@jp.panasonic.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140227061840.GB47921>