From owner-freebsd-arch Wed Dec 13 10:23:20 2000 From owner-freebsd-arch@FreeBSD.ORG Wed Dec 13 10:23:18 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 4B6FA37B400 for ; Wed, 13 Dec 2000 10:23:18 -0800 (PST) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id eBDIMSE33042; Wed, 13 Dec 2000 10:22:28 -0800 (PST) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.11.1/8.11.0) id eBDILg429310; Wed, 13 Dec 2000 10:21:42 -0800 (PST) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200012131539.eBDFdMs27981@aslan.scsiguy.com> Date: Wed, 13 Dec 2000 10:21:41 -0800 (PST) Organization: BSD, Inc. From: John Baldwin To: "Justin T. Gibbs" Subject: Re: An opaque refcount type Cc: arch@FreeBSD.ORG, Garrett Wollman Sender: jhb@foo.osd.bsdi.com Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 13-Dec-00 Justin T. Gibbs wrote: >>It's opaque in the sense that a user doesn't know what it is inside it. This >>means we can freely change around the implementation. For example, in the >>INVARIANTS case it adds in lots of extra checks, but to ensure correctness, >>it >>has to add in a mutex to use. > > My problem with it is that in the instances where you have to acquire > a mutex anyway to manage the data, you will not want to use this interface. > So, unlike say the LIST macros, there is no chance for our code to > standardize > on a single refcount API. Yes, I don't like that part of it either. In order to make it fast and lightweight it is not the swiss army knife of refcounts. If we don't use this, then probably we will just fall back to using a mutex for each refcount. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.Baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message