From owner-cvs-src@FreeBSD.ORG Thu Feb 14 15:49:00 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7DA516A468; Thu, 14 Feb 2008 15:49:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 9BEA013C46A; Thu, 14 Feb 2008 15:49:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 1C5D21A4D86; Thu, 14 Feb 2008 07:49:00 -0800 (PST) From: John Baldwin To: "Attilio Rao" Date: Thu, 14 Feb 2008 09:25:58 -0500 User-Agent: KMail/1.9.7 References: <200802132333.m1DNXokI060695@repoman.freebsd.org> <3bbf2fe10802131616p53b2bae2ma4bccef2d8c8fb76@mail.gmail.com> In-Reply-To: <3bbf2fe10802131616p53b2bae2ma4bccef2d8c8fb76@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802140925.58430.jhb@freebsd.org> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_mutex.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2008 15:49:00 -0000 On Wednesday 13 February 2008 07:16:11 pm Attilio Rao wrote: > 2008/2/14, John Baldwin : > > jhb 2008-02-13 23:33:50 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern kern_mutex.c > > Log: > > Add a couple of assertions and KTR logging to thread_lock_flags() to > > match mtx_lock_spin_flags(). > > As I tried to pointed out in perforce, it would not be better to check > against LC_SPINLOCK (and lc_flags) instead than direct comparisons > with lock_class_mtx_spin ? In this case, no, as if we had a foo lock that was a spin lock, mtx_lock_spin() and thread_lock() would still be wrong. They truly only operate on MTX_SPIN mutexes. -- John Baldwin