On Wed, 6 Mar 2024 23:09:34 GMT, Dean Long <dl...@openjdk.org> wrote:

>> This change creates a new sort of native recursive lock that can be held 
>> during JNI and Java calls, which can be used for synchronization while 
>> creating objArrayKlasses at runtime.
>> 
>> Passes tier1-7.
>
> src/hotspot/share/runtime/mutex.cpp line 537:
> 
>> 535:     // can be called by jvmti by VMThread.
>> 536:     if (current->is_Java_thread()) {
>> 537:       _sem.wait_with_safepoint_check(JavaThread::cast(current));
> 
> Why not use PlatformMutex + OSThreadWaitState instead of a semaphore?

Semaphore seemed simpler (?)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17739#discussion_r1515294583

Reply via email to