From owner-freebsd-arch Tue Dec 12 13: 7:55 2000 From owner-freebsd-arch@FreeBSD.ORG Tue Dec 12 13:07:50 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 630CA37B402 for ; Tue, 12 Dec 2000 13:07:47 -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 eBCL7gE97156; Tue, 12 Dec 2000 13:07:42 -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 eBCL6v320085; Tue, 12 Dec 2000 13:06:57 -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: <200012122100.QAA53113@khavrinen.lcs.mit.edu> Date: Tue, 12 Dec 2000 13:06:56 -0800 (PST) Organization: BSD, Inc. From: John Baldwin To: Garrett Wollman Subject: Re: An opaque refcount type Cc: arch@FreeBSD.ORG Sender: jhb@foo.osd.bsdi.com Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 12-Dec-00 Garrett Wollman wrote: > In article > you write: >>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. 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. > In any event, I think requiring a functional interface to reference > counts is probably a Bad Idea. Would you prefer C macros to static inline's then? > -GAWollman -- 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