From owner-freebsd-current Fri Mar 21 9:59:39 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62F5C37B404 for ; Fri, 21 Mar 2003 09:59:38 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 49DDF43FCB for ; Fri, 21 Mar 2003 09:59:37 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 15981 invoked by uid 1000); 21 Mar 2003 17:59:37 -0000 Date: Fri, 21 Mar 2003 09:59:37 -0800 (PST) From: Nate Lawson To: "Matthew N. Dodd" Cc: current@FreeBSD.ORG, wpaul@FreeBSD.ORG Subject: Re: Updated if_* attach/detach patches In-Reply-To: <20030321095558.O8716@sasami.jurai.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 21 Mar 2003, Matthew N. Dodd wrote: > On Wed, 19 Mar 2003, Nate Lawson wrote: > > Patches are at: > > http://www.root.org/~nate/freebsd/if_pci/ > > I'd like to see calls to mtx_destroy() protected by a test for > mtx_initialized(). > > In most cases this isn't strictly necessary but its not bad practice. Perhaps I should add a comment mentioning my assumption: mtx_init is one of the first things called and since detach unconditionally locks the mtx, it should never be called unless the mutex is initialized. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message