[jmm-dev] bitwise RMW operators, specifically testAndSetBit/BTS
martinrb at google.com
Wed Jul 20 21:11:37 UTC 2016
17.6 should be called "word bleeding"
17.7 should be called "long fission"
(fission breaks up your atoms!)
On Wed, Jul 20, 2016 at 11:20 AM, Hans Boehm <boehm at acm.org> wrote:
> You are not alone. I have the suspicion that "word tearing" used to mean
> 17.7 before the 2005 JLS revision. But the JLS usage seems to have won,
> for better or worse, at least in Java circles.
> On Wed, Jul 20, 2016 at 9:59 AM, Martin Buchholz <martinrb at google.com>
>> On Wed, Jul 20, 2016 at 1:25 AM, Paul Sandoz <Paul.Sandoz at oracle.com>
>> > > We should probably clarify whether we really mean that even
>> > on longs/doubles is allowed.
>> > Just to be clear you are referring to atomicity rather than word tearing
>> > as specified by JLS:
>> > https://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.6
>> > https://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.6>
>> > ? (I have tended to use word tearing interchangeably in the past and it
>> > has caused confusion.)
>> YIKES! I just re-read
>> 17.6. Word Tearing
>> 17.7. Non-atomic Treatment of double and long
>> and now realize I've been using "word tearing" to mean 17.7 instead of
>> for many years. I don't have a good word for 17.6, but I want something
>> along the lines of "ghost writes" or "collateral damage".
>> Am I supposed to visualize "tearing" as (sad eye water) tears running out
>> of one byte across neighbor bytes?
More information about the jmm-dev