RFR: 8369250: Assess and remedy any unsafe usage of the Semaphore used by NonJavaThread::List

Stefan Karlsson stefank at openjdk.org
Tue Oct 7 08:25:02 UTC 2025


On Tue, 7 Oct 2025 07:13:28 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> But we could instead have in the header
>> 
>> void non_java_threads_list_init();
>> 
>> and in the .cpp file
>> 
>> void non_java_threads_list_init() { NonJavaThread::init(); }
>> 
>> which is an idiom we frequently use elsewhere.
>
> IIUC given the declaration:'
> 
> static DeferredStatic<List> _the_list;
> 
> the compiler must be able to see that `List` has an `initialize` method.

And why can't you put `List` before that line?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27664#discussion_r2409814622


More information about the hotspot-runtime-dev mailing list