From owner-freebsd-arch Thu May 18 13: 3:32 2000 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by hub.freebsd.org (Postfix) with ESMTP id 8729137B7C5 for ; Thu, 18 May 2000 13:03:26 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 12sWVv-0008lG-0W; Thu, 18 May 2000 21:03:23 +0100 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id VAA45927; Thu, 18 May 2000 21:08:38 +0100 (BST) (envelope-from dfr@nlsystems.com) Date: Thu, 18 May 2000 21:07:43 +0100 (BST) From: Doug Rabson To: Wes Peters Cc: arch@FreeBSD.ORG Subject: Re: A new api for asynchronous task execution In-Reply-To: <392410CB.6B86AA@softweyr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 18 May 2000, Wes Peters wrote: > Doug Rabson wrote: > > > > The BSD/OS mutex code includes a compile-time-selected debugging feature > > which automatically detects locking hierarchy violations. Anyway, using a > > mutex here doesn't add to locking complexity since the mutex would be > > exited before calling the task's callback and re-entered after. > > Wouldn't it make more sense to provide an inversion-proof semaphore? > Or is that what they're doing? I'm sure Chuck can describe it better than me. As I understand it, the BSD/OS object is a simple counting mutex which comes in both blocking and spinning forms. There is a set of strict rules for mutex nesting which the debugging code uses to detect e.g. deadly embrace etc. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message