From owner-freebsd-arch Fri Oct 13 10:44:27 2000 Delivered-To: freebsd-arch@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id A545137B503 for ; Fri, 13 Oct 2000 10:44:25 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e9DHi5R19624; Fri, 13 Oct 2000 10:44:05 -0700 (PDT) Date: Fri, 13 Oct 2000 10:44:05 -0700 From: Alfred Perlstein To: Terry Lambert Cc: Peter Wemm , arch@FreeBSD.ORG Subject: Re: we need atomic_t Message-ID: <20001013104405.M272@fw.wintelcom.net> References: <200010130934.e9D9YdG38096@netplex.com.au> <200010130944.CAA23368@usr09.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200010130944.CAA23368@usr09.primenet.com>; from tlambert@primenet.com on Fri, Oct 13, 2000 at 09:44:34AM +0000 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Terry Lambert [001013 02:44] wrote: > > > Why call it "atomic_t" instead of "long", then? > > > > Because certain arch'es that have a greater than zero probability of having > > a FreeBSD port cannot do atomic operations on entities larger than 24 bits. > > Therefore, atomic_add_long() etc cannot exist on that system, but atomic_t > > can. > > OK, OK; Alfred wanted only 16 bits. So I recant, and change the > question to: > > "Why call it "atomic_t" instead of "uint16_t", then? Because by hiding it in a structure one can prevent people from doing direct assignments, and as I stated before, not all arches can support atomic ops, therefore they need to be a struct in order to encapsulate a mutex alongside the value. I think we're getting really off track here, when I have some time to breath and not just answer emails I'll be committing the code to realize this type so I can proceed with my mpsafe work. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message