Date: Fri, 13 Oct 2000 10:44:05 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: Terry Lambert <tlambert@primenet.com> Cc: Peter Wemm <peter@netplex.com.au>, arch@FreeBSD.ORG Subject: Re: we need atomic_t Message-ID: <20001013104405.M272@fw.wintelcom.net> In-Reply-To: <200010130944.CAA23368@usr09.primenet.com>; from tlambert@primenet.com on Fri, Oct 13, 2000 at 09:44:34AM %2B0000 References: <200010130934.e9D9YdG38096@netplex.com.au> <200010130944.CAA23368@usr09.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Terry Lambert <tlambert@primenet.com> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001013104405.M272>