From owner-freebsd-arch Thu Oct 12 14: 3:18 2000 Delivered-To: freebsd-arch@freebsd.org Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (Postfix) with ESMTP id 891DF37B502; Thu, 12 Oct 2000 14:03:15 -0700 (PDT) Received: (from daemon@localhost) by smtp04.primenet.com (8.9.3/8.9.3) id OAA18260; Thu, 12 Oct 2000 14:00:23 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp04.primenet.com, id smtpdAAAOraOCJ; Thu Oct 12 14:00:15 2000 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id OAA16802; Thu, 12 Oct 2000 14:02:56 -0700 (MST) From: Terry Lambert Message-Id: <200010122102.OAA16802@usr07.primenet.com> Subject: Re: we need atomic_t To: cp@bsdi.com (Chuck Paterson) Date: Thu, 12 Oct 2000 21:02:50 +0000 (GMT) Cc: tlambert@primenet.com (Terry Lambert), bright@wintelcom.net (Alfred Perlstein), msmith@freebsd.org (Mike Smith), arch@freebsd.org In-Reply-To: <200010122007.OAA18121@berserker.bsdi.com> from "Chuck Paterson" at Oct 12, 2000 02:07:54 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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