Date: Sun, 17 Dec 2000 09:02:58 -0700 From: Chuck Paterson <cp@bsdi.com> To: Bruce Evans <bde@zeta.org.au> Cc: smp@FreeBSD.ORG Subject: Re: atomic increment? Message-ID: <200012171602.eBHG2wP13434@berserker.bsdi.com> In-Reply-To: Your message of "Mon, 18 Dec 2000 00:40:46 %2B1100." <Pine.BSF.4.21.0012172338480.8671-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce, It was my understanding that declaring an asm volatile would generate all the same symantics as calling a function at that point. This is certainly the effect I have observed, and if you want to us atomic operations for locking, such as spin locks, it is the effect you better get. Am I wrong about this? This is why I thought the data in registers would be almost all discarded. FYI, The BSD/OS kernel builds -O2, without declaring the ams as volatile they would move all over the place. Turning on O2 found a boat load of incorrect assumptions about what ordering was guaranteed. Chuck To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012171602.eBHG2wP13434>