RFR: 8280828: Improve invariants in NonblockingQueue::append
Kim Barrett
kbarrett at openjdk.java.net
Thu Jan 27 21:06:38 UTC 2022
Please review this change to NonblockingQueue to improve invariants in the
append operation by making a change in try_pop.
When taking the last entry in the queue, try_pop needs to do some cleanup of
the queue fields, setting them to NULL. The order of those cleanups doesn't
matter for correctness. However, setting first _head then _tail permits
append to assert that _head is NULL when it finds _tail was NULL. The current
order (set _tail first, then _head) doesn't permit such an assertion.
Testing:
mach5 tier1-3
I also did lots of testing with this change included while investigating
JDK-8273383.
-------------
Commit messages:
- append invariant
Changes: https://git.openjdk.java.net/jdk/pull/7250/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7250&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8280828
Stats: 44 lines in 1 file changed: 19 ins; 6 del; 19 mod
Patch: https://git.openjdk.java.net/jdk/pull/7250.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7250/head:pull/7250
PR: https://git.openjdk.java.net/jdk/pull/7250
More information about the hotspot-dev
mailing list