Date: Thu, 27 Feb 2014 12:03:29 +0100 From: Hans Petter Selasky <hps@bitfrost.no> To: Kohji Okuno <okuno.kohji@jp.panasonic.com>, jmg@funkthat.com Cc: freebsd-current@freebsd.org Subject: Re: kqueue for KBD. Message-ID: <530F1B81.807@bitfrost.no> In-Reply-To: <20140227.195956.1191893338998586416.okuno.kohji@jp.panasonic.com> References: <20140227.142445.47188371497615592.okuno.kohji@jp.panasonic.com> <20140227061840.GB47921@funkthat.com> <20140227.195956.1191893338998586416.okuno.kohji@jp.panasonic.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 02/27/14 11:59, Kohji Okuno wrote: > + sc = kbd->kb_dev->si_drv1; > + knlist_clear(&sc->gkb_rsel.si_note, 0); > + knlist_destroy(&sc->gkb_rsel.si_note); > + > free(kbd->kb_dev->si_drv1, M_DEVBUF); > destroy_dev(kbd->kb_dev); Hi, You should put the "knlist_destroy()" after the "destroy_dev()" and leave out the "knlist_clear()" I think! Because "destroy_dev()" is a synchronous function which ensure that all character device refs are gone including knotes, if I'm not mistaken. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?530F1B81.807>