Date: Fri, 25 Apr 2003 18:43:21 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h Message-ID: <xzpsms6bk9i.fsf@flood.ping.uio.no> In-Reply-To: <XFMail.20030425120756.jhb@FreeBSD.org> (John Baldwin's message of "Fri, 25 Apr 2003 12:07:56 -0400 (EDT)") References: <XFMail.20030425120756.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb@FreeBSD.org> writes: > Agreed, locks should be protecting data structures, not code blocks. Locks that protect code paths are called monitors and aren't very useful except in OO languages. I can't think of any cases in the kernel where we would want to lock a code path; if anyone can think of an example, I'm willing to bet that they're just deluding themselves into thinking that a lock on a singleton object (or unique variable) is actually a lock on the code that accesses it. DES -- Dag-Erling Smorgrav - des@ofug.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpsms6bk9i.fsf>