Date: Mon, 25 Sep 2000 03:30:08 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: mjacob@feral.com Cc: brian@Awfulhak.org (Brian Somers), grog@wantadilla.lemis.com (Greg Lehey), cp@bsdi.com (Chuck Paterson), archie@whistle.com (Archie Cobbs), joerg@cs.waikato.ac.nz (Joerg Micheel), frank@exit.com (Frank Mayhar), jhb@pike.osd.bsdi.com (John Baldwin), markm@FreeBSD.ORG (Mark Murray), FreeBSD-arch@FreeBSD.ORG Subject: Re: Mutexes and semaphores (was: cvs commit: src/sys/conf files Message-ID: <200009250330.UAA05163@usr05.primenet.com> In-Reply-To: <Pine.GSO.4.21.0009241742260.506-100000@bird.feral.com> from "Matthew Jacob" at Sep 24, 2000 05:44:17 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> Sure. And when we the network stack and CAM and the VFS layer are re-thought > out to know how to deal with reentrancy, then I'll be happy to have > non-recursive locks. This is easy: mark them non-reentrant. You can either acquire a mutex on descent into them and release it on exit/sleep, or (and this is better), have a per-module mutex that's acquired on the descent/wakeup and released on the ascent, if the flag is present. This will let the modules be corrected on a per FS and per CAM driver basis, while maintaining legacy compatability. We do not need another ethnic clensing of the drivers, such as what we went through when CAM went in, or when the X.25 and ISODE stuff was murdered. > You're missing the point. If you're on Solaris, you are making a mistake in > your coding if you're recursing. If you're on FreeBSD, then too many things > have still to be redesigned to make that claim. I think he understands that, I just think he's unwilling to live with a kludge, which will have no incentive to be de-kludged, as it wouldn't actually not work. It's much better to be able to _know_ what code is OK and what code isn't, instead of pretending that it's all OK, when it's not. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009250330.UAA05163>