RFR: 8187227: __m68k_cmpxchg() is not being used correctly

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Sat Nov 18 12:15:24 UTC 2017


On 11/18/2017 12:46 PM, Andrew Haley wrote:
>> Without seeing how that wrapper actually works, it is hard to know 
>> whether what you are saying and your fix is correct. The description of 
>> the CAS at [1] doesn't help without knowing how it actually gets used.
> 
> I can't see the point of the loops.

The loops are necessary because it's not guaranteed that the CAS instruction
will succeed at first attempt. You basically have to keep trying until it
succeeds. At least to my current knowledge.

The loops are already in the code, FWIW. I am just modifying the code because
the current code makes incorrect assumptions on how __m68k_cmpxchg() actually
works.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


More information about the hotspot-dev mailing list