Date: Mon, 12 Nov 2001 15:57:38 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: John Baldwin <jhb@FreeBSD.ORG> Cc: Terry Lambert <tlambert2@mindspring.com>, Robert Watson <rwatson@FreeBSD.ORG>, freebsd-arch@FreeBSD.ORG Subject: Re: cur{thread/proc}, or not. Message-ID: <200111122357.fACNvc507188@apollo.backplane.com> References: <XFMail.011112153221.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
: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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111122357.fACNvc507188>