[jdk18] Integrated: 8278389: SuspendibleThreadSet::_suspend_all should be volatile/atomic

Thomas Schatzl tschatzl at openjdk.java.net
Thu Dec 16 12:34:01 UTC 2021


On Fri, 10 Dec 2021 14:04:27 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
> can I have reviews for this change that makes SuspendibleThreadSet::_suspend_all volatile and all accesses to it use Atomic helpers?
> 
> I found that the only getter for that member is called SuspendibleThreadSet::should_yield(), which contradicts our naming rules; to keep the change minimal (and the naming discussion out of this PR because I do not feel that _suspend_all is particularly good) I introduced a private suspend_all() method.
> I can of course add some renaming in this change (but then for jdk19+ only).
> 
> Testing: gha, local compilation
> 
> Thanks,
> Thomas

This pull request has now been integrated.

Changeset: aec1b039
Author:    Thomas Schatzl <tschatzl at openjdk.org>
URL:       https://git.openjdk.java.net/jdk18/commit/aec1b039b35b73db17c943cdd86949a92e64fcb6
Stats:     20 lines in 2 files changed: 5 ins; 1 del; 14 mod

8278389: SuspendibleThreadSet::_suspend_all should be volatile/atomic

Reviewed-by: ayang, mli

-------------

PR: https://git.openjdk.java.net/jdk18/pull/10



More information about the hotspot-gc-dev mailing list