Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Dec 2000 11:35:47 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bernd Walter <ticso@cicely5.cicely.de>
Cc:        freebsd-alpha@FreeBSD.org
Subject:   RE: mb and wmb in atomic_
Message-ID:  <XFMail.001215113547.jhb@FreeBSD.org>
In-Reply-To: <20001215193443.B62048@cicely5.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help

On 15-Dec-00 Bernd Walter wrote:
> Why are the mb and wmb operations needed in the atomic_ functions?
> If I understood it correctly the locked operations are in synced
> with others CPUs and there is no memory operation beside the variable
> itself.

They should probably only be used with the 'acq' and 'rel' variants.  Hmm, btw,
it looks like I have the order of the barriers in the 'acq' and 'rel' variants
wrong.  The barriers should be on the inside, not the outside.  Anyone disagree?

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.001215113547.jhb>