From owner-freebsd-arch Tue Dec 12 13: 9:48 2000 From owner-freebsd-arch@FreeBSD.ORG Tue Dec 12 13:09:46 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 4C9DD37B400; Tue, 12 Dec 2000 13:09:46 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id eBCL6UA78335; Tue, 12 Dec 2000 15:06:30 -0600 (CST) (envelope-from jlemon) Date: Tue, 12 Dec 2000 15:06:29 -0600 From: Jonathan Lemon To: John Baldwin Cc: arch@FreeBSD.ORG Subject: Re: An opaque refcount type Message-ID: <20001212150629.B37608@prism.flugsvamp.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Dec 12, 2000 at 12:24:50PM -0800, John Baldwin wrote: > Here's another bikeshed war for everyone to get in on: I've implemented a > relatively light weight and very simple opaque reference counter. It defines > an opaque refcount_t type. In the INVARIANTS case, this maps to a structure I find myself wanting something more like a gated refcount; if the gate is "open", then bump the reference (all atomically), otherwise fail. However, it isn't quite clear what to do on a release, and it probably is not going to fit into this model. I can say at this point that I'm going to need something more complicated than what is proposed for reference counts on route entries and code that can be kld{load/unload}ed. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message