From owner-freebsd-arch Mon Sep 25 8:13:53 2000 Delivered-To: freebsd-arch@freebsd.org Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 0E96D37B422 for ; Mon, 25 Sep 2000 08:13:51 -0700 (PDT) Received: from realtime.exit.com (realtime [206.223.0.5]) by tinker.exit.com (8.11.0/8.11.0) with ESMTP id e8PFDjO08881; Mon, 25 Sep 2000 08:13:45 -0700 (PDT) (envelope-from frank@exit.com) Received: (from frank@localhost) by realtime.exit.com (8.11.0/8.11.0) id e8PFET802275; Mon, 25 Sep 2000 08:14:29 -0700 (PDT) (envelope-from frank) From: Frank Mayhar Message-Id: <200009251514.e8PFET802275@realtime.exit.com> Subject: Re: Mutexes and semaphores (was: cvs commit: src/sys/conf files In-Reply-To: <200009250827.BAA12659@usr02.primenet.com> from Terry Lambert at "Sep 25, 2000 08:27:55 am" To: Terry Lambert Date: Mon, 25 Sep 2000 07:59:12 -0700 (PDT) Cc: mjacob@feral.com, Brian Somers , Greg Lehey , Chuck Paterson , Archie Cobbs , Joerg Micheel , John Baldwin , Mark Murray , FreeBSD-arch@FreeBSD.ORG.ORG Reply-To: frank@exit.com Organization: Exit Consulting X-Copyright0: Copyright 2000 Frank Mayhar. All Rights Reserved. X-Copyright1: Permission granted for electronic reproduction as Usenet News or email only. X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: > With the suggested mutex recursion (please -- use a counting > semaphore, not a mutex, if you are going to permit recursion!), That's basically what it is, more or less. > If you are willing to whine about recursion, then I suppose > that having recursion would not be that bad; but turn off > the whining, and there's little incentive to fix it, since > to many people's minds, it won't be broken. 8-(. Well, I can't speak for FreeBSD, but as far as BSD/OS goes, I plan to fix this stuff. I cut my teeth on SVR4.2 ES/MP, so I'm not used to recursive locks anyway, and I quite agree that if the code _needs_ a recursive lock, there's more going on there and the possibility of deadlocks is high. My code doesn't use recursive locks. Yeah, it's more work, but it's well worth it in the long run. I think it's a relatively small price to pay for long-term reliability and for not needing to go back and reexamine everything down the road a bit. (I hope this makes sense; I haven't had my coffee yet. :-/) -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://store.exit.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message