From owner-cvs-src Tue Mar 4 13:49:23 2003 Delivered-To: cvs-src@freebsd.org Received: from green.bikeshed.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 083CA37B401; Tue, 4 Mar 2003 13:49:21 -0800 (PST) Received: from green.bikeshed.org (smclkqrliaepnw4u@green.bikeshed.org [10.0.0.1] (may be forged)) by green.bikeshed.org (8.12.7/8.12.6) with ESMTP id h24LnK97073296; Tue, 4 Mar 2003 16:49:20 -0500 (EST) (envelope-from green@green.bikeshed.org) Received: from localhost (green@localhost) by green.bikeshed.org (8.12.7/8.12.6/Submit) with ESMTP id h24LnKSQ073292; Tue, 4 Mar 2003 16:49:20 -0500 (EST) Message-Id: <200303042149.h24LnKSQ073292@green.bikeshed.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: John Baldwin Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_mutex.c In-Reply-To: Your message of "Tue, 04 Mar 2003 13:32:25 PST." <200303042132.h24LWPrE064362@repoman.freebsd.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 04 Mar 2003 16:49:20 -0500 Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG John Baldwin wrote: > jhb 2003/03/04 13:32:25 PST > > FreeBSD src repository > > Modified files: > sys/kern kern_mutex.c > Log: > Remove safety belt: it is now ok to do a mtx_trylock() on a mutex you > already own. The mtx_trylock() will fail however. Enhance the comment > at the top of the try lock function to explain this. > > Requested by: jlemon and his evil netisr locking I admit I've never actually had a use for mtx_trylock() but... wouldn't you like to detect it and assert against it if you're not expecting it? If jlemon's behavior is the only one that relies on that part of the semantics, perhaps it should be another kind of mtx_trylock() call. I guess the real question is just whether or not the assert would ever have done good for anyone while working. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message