Date: Tue, 12 Dec 2000 13:06:56 -0800 (PST) From: John Baldwin <jhb@FreeBSD.ORG> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: arch@FreeBSD.ORG Subject: Re: An opaque refcount type Message-ID: <XFMail.001212130656.jhb@FreeBSD.org> In-Reply-To: <200012122100.QAA53113@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12-Dec-00 Garrett Wollman wrote: > In article <mit.lcs.mail.freebsd-arch/XFMail.001212122450.jhb@FreeBSD.org> > 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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001212130656.jhb>