RFR: 8185723: Zero: segfaults on Power PC 32-bit
aph at redhat.com
Thu Aug 3 10:06:31 UTC 2017
On 03/08/17 10:32, John Paul Adrian Glaubitz wrote:
> Btw, I'm currently trying to wrap my head around how to implement
> atomic_copy64() on m68k with inline assembly using cas2 which allows
> compare-and-swap with two 32-bit values and hence the implementation
> of an atomic_copy64().
> I think either __arch_compare_and_exchange_val_64_acq() or
> atomic_exchange_acq() from  should help.
The first one is what you want, assuming that you're happy to
write to an operand you're supposed to only read.
But there may be a better way of handling atomic doublewords on the
68k. Instead, define an array of lock words and yield on one of them
when reading or writing a doubleword. That way you (probably) only
block when two threads really are contending, and the instant you
detect contention you yield.
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev