From owner-freebsd-arch Mon Nov 12 15:57:42 2001 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 02BEE37B417; Mon, 12 Nov 2001 15:57:39 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id fACNvc507188; Mon, 12 Nov 2001 15:57:38 -0800 (PST) (envelope-from dillon) Date: Mon, 12 Nov 2001 15:57:38 -0800 (PST) From: Matthew Dillon Message-Id: <200111122357.fACNvc507188@apollo.backplane.com> To: John Baldwin Cc: Terry Lambert , Robert Watson , freebsd-arch@FreeBSD.ORG Subject: Re: cur{thread/proc}, or not. References: Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :http://www.freebsd.org/~jhb/patches/refcount.patch : :It's slightly different than this in that refcount_drop() returns a boolean Ok, I've read it. Ick. Could you reorgranize it a bit to do something slightly different? Make sys/refcount.h provide a machine portable set of routines. Allow the machine/refcount.h headers to override the portable set. This way an architecture does *NOT* need to implement routines for yet another header file (or duplicate a lot of code over and over again). This business about INVARIANTS makes no sense to me. INVARIANTS should not totally change the way the refcount API works. It certainly should not result in different structures! If we are embedding ref counts in every structure in the system simply setting or clearing INVARIANTS blows up our compatibility, which is bad. Also, I don't see any reason to embed yet another mutex in a structure. The ref count should be a simple int. Use a pool of mutexes. If you like I'll commit a set of generic pool mutexes that you can simply call. How about that? -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message