From owner-cvs-all@FreeBSD.ORG Mon Jun 14 19:05:11 2004 Return-Path: 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 7B94F16A4CE; Mon, 14 Jun 2004 19:05:11 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DFF443D1F; Mon, 14 Jun 2004 19:05:11 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 21DA75C829; Mon, 14 Jun 2004 12:04:12 -0700 (PDT) Date: Mon, 14 Jun 2004 12:04:12 -0700 From: Alfred Perlstein To: Robert Watson Message-ID: <20040614190412.GF61448@elvis.mu.org> References: <200406122047.i5CKlWin099013@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_descrip.c uipc_socket.c uipc_syscalls.c uipc_usrreq.c src/sys/net raw_cb.c raw_usrreq.c src/sys/netatm atm_socket.c src/sys/netatalk ddp_pcb.c src/sys/netgraph ng_ksocket.c src/sys/netgraph/bluetooth/socket ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 19:05:11 -0000 * Robert Watson [040612 14:02] wrote: > > I'm not entirely happy with the assymetric locking here, but since these > calls release references to the object, I think it makes some amount of > sense. Right now, I opt to have the caller manage locking so that the > impact of acquiring the socket lock is visible in the caller to discourage > improper calling of these APIs. We might eventually want to push locking > down into these APIs, but I don't think we want to do that yet. Assymetric locking is common with refcount based APIs when releasing objects. Typically convention has been to have a function that drops an unlocked object (fdrop) and one that takes a locked object for convenience (fdrop_locked). -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684