From owner-cvs-all Wed Mar 5 12:36:32 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4966337B405 for ; Wed, 5 Mar 2003 12:36:30 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id E0AAC43FBF for ; Wed, 5 Mar 2003 12:36:27 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 83247 invoked by uid 1000); 5 Mar 2003 20:36:28 -0000 Date: Wed, 5 Mar 2003 12:36:28 -0800 (PST) From: Nate Lawson To: Julian Elischer Cc: John Baldwin , cvs-all@FreeBSD.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_mutex.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 5 Mar 2003, Julian Elischer wrote: > On Wed, 5 Mar 2003, Nate Lawson wrote: > > My issue is with contention for a named endpoint. If one thread enables > > traffic to an endpoint and then disables it, it still has the endpoint > > allocated. If another thread tries to enable the same endpoint, it needs > > to lock the OTHER endpoint, check if it's disabled (freeing it if it is), > > and then unlock it. My current locking approach is to lock my own softc, > > lock the driver global mtx, and then lock the OTHER thread's softc before > > checking if it is enabled. > > This is very similar to the case I was trying to solve.. > I was trying to create and destroy netgraph links. > from different ends of the connection.. > I ended up taking a completely different approach. :-) What was the new approach? -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message