Date: Thu, 03 Oct 2002 11:31:06 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Don Lewis <dl-freebsd@catspoiler.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_event.c Message-ID: <XFMail.20021003113106.jhb@FreeBSD.org> In-Reply-To: <200210030613.g936CxvU017849@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03-Oct-2002 Don Lewis wrote: > On 2 Oct, Don Lewis wrote: >> truckman 2002/10/02 23:03:26 PDT >> >> Modified files: >> sys/kern kern_event.c >> Log: >> hashinit() calls MALLOC(), so release the filedesc lock in knote_attach() >> before calling hashinit() and relock afterwards, taking care to see that >> we don't lose a race. >> >> Revision Changes Path >> 1.46 +16 -4 src/sys/kern/kern_event.c > > knote_attach() could use some cleanup. It would be possible to get rid > of some extraneous unlocking and relocking if the calls to free() were > moved to the end and made conditional. I'm not much of a fan of this > type of conditional code, but it is less costly than doing a bunch of > extra lock manipulation. Actually, it is probably ok to hold locks across free() since it doesn't sleep. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021003113106.jhb>