RFR: 8294278: ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase
Martin Buchholz
martin at openjdk.org
Wed Nov 30 02:21:21 UTC 2022
On Fri, 25 Nov 2022 14:53:57 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> Two (since 19) usages of Unsafe.getAndAddInt to update a static field provide the Class object as the base instead of the base object returned by Unsafe.staticFieldBase. This doesn't change anything on the HotSpot VM.
The introduction of POOLIDS_BASE strengthens the case for renaming POOLIDS to POOLIDS_OFFSET for clarity - I would do that.
-------------
Marked as reviewed by martin (Reviewer).
PR: https://git.openjdk.org/jdk/pull/11369
More information about the core-libs-dev
mailing list