[concurrency-interest] offheap plain store reordering

Brian Harris brianfromoregon at gmail.com
Fri Jan 12 09:48:44 EST 2018


Hi

A question on Vitaly's comment here:
http://cs.oswego.edu/pipermail/concurrency-interest/2013-August/011674.html
"whereas if you have two plain stores, the compiler can technically reorder
them as it sees fit"

Can these offheap plain stores also be reordered by the compiler?
unsafe.putLong(null, addr1, 1)
unsafe.putLong(null, addr2, 2)

If so, I'd want to use putOrderedLong as a compiler directive to prevent
that.
unsafe.putLong(null, addr1, 1)
unsafe.putOrderedLong(null, addr2, 2)

Thanks
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20180112/f0ea415a/attachment.html>


More information about the Concurrency-interest mailing list