Date: Fri, 8 Dec 2000 22:20:15 -0800 From: Arun Sharma <adsharma@sharmas.dhs.org> To: jhb@FreeBSD.ORG Cc: smp@FreeBSD.ORG Subject: Re: Userland atomic assignments Message-ID: <200012090620.WAA28099@sharmas.dhs.org> In-Reply-To: <XFMail.001207142615.jhb@FreeBSD.org> References: <Pine.SUN.3.91.1001207171540.10405A-100000@pcnet1.pcnet.com> <XFMail.001207142615.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7 Dec 2000 23:26:10 +0100, John Baldwin <jhb@FreeBSD.ORG> wrote: > a = b; should be atomic I think. If its not, then large portions of the kernel > break, IIRC. a = b, may be atomic depending on the types of a and b. On 32 bit machines, everything less than 32 bits should be atomic. However, the complexity comes from memory ordering issues. All of x86 boxes ensure sequential consistency. Some subset of Alpha boxes [1] provide a weak ordering model as a way to improve performance. On such boxes, after executing: a = b c = d (c == d) does not imply (a == b). You need to have an explicit memory barrier in between. -Arun [1] Can any Alpha gurus comment on this ? 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?200012090620.WAA28099>