From owner-freebsd-arch Tue Dec 12 13: 4: 4 2000 From owner-freebsd-arch@FreeBSD.ORG Tue Dec 12 13:04:02 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id CC11137B6A0; Tue, 12 Dec 2000 13:03:58 -0800 (PST) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id OAA20177; Tue, 12 Dec 2000 14:03:53 -0700 (MST) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id OAA27194; Tue, 12 Dec 2000 14:03:52 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14902.37560.212440.830262@nomad.yogotech.com> Date: Tue, 12 Dec 2000 14:03:52 -0700 (MST) To: Garrett Wollman Cc: jhb@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: An opaque refcount type In-Reply-To: <200012122100.QAA53113@khavrinen.lcs.mit.edu> References: <200012122100.QAA53113@khavrinen.lcs.mit.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >an opaque refcount_t type. > > By definition, C typedefs can never be opaque. Only pointers to > incomplete aggregates (i.e., `struct foo *' or `union bar *') are > opaque in C. > > In any event, I think requiring a functional interface to reference > counts is probably a Bad Idea. I disagree. This is a very object oriented thing to do, and it allow you to hide the vulgarities of doing things 'safely' behind the API. On a Sparc a refcount might be 24 bits wide, on the 386/486 it can be safely 32 bits, ia64 64bits, etc... Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message