Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Oct 2000 21:02:50 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        cp@bsdi.com (Chuck Paterson)
Cc:        tlambert@primenet.com (Terry Lambert), bright@wintelcom.net (Alfred Perlstein), msmith@freebsd.org (Mike Smith), arch@freebsd.org
Subject:   Re: we need atomic_t
Message-ID:  <200010122102.OAA16802@usr07.primenet.com>
In-Reply-To: <200010122007.OAA18121@berserker.bsdi.com> from "Chuck Paterson" at Oct 12, 2000 02:07:54 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 	Lets say its not a counter, but something that 
> gets bits or'd into it. Seems that it better be
> big enough to hold the bit that is going to be or'd
> in? We have to worry about this today, I don't see
> this changing just because we declare it atomic.

To heck with "atomic", now we are just complaining about the
lack of foresight of the X3J11 committe in copping out on
giving us sized types in the C language itself.

I think if "it's big enough", there isn't a problem.  You
will never use something like this for hardware registers,
since hardware registers are sized, so as long as you commit
to either "at least 16 bits" or "at least 32 bits", it's not
a problem: just only ever use 16 or 32 bits, and so what if
some bits are "wasted", if all you care about is atomicity?


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


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?200010122102.OAA16802>