[jdk17] RFR: 8269865: Async UL needs to handle ERANGE on exceeding SEM_VALUE_MAX [v6]

Xin Liu xliu at openjdk.java.net
Tue Jul 13 16:30:17 UTC 2021


On Tue, 13 Jul 2021 11:25:17 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace counting semaphaore with  os::PlatformMonitor.
>
> src/hotspot/share/logging/logAsyncWriter.hpp line 141:
> 
>> 139:   Semaphore _lock;
>> 140:   Semaphore _flush_sem;
>> 141:   os::PlatformMonitor _cv;
> 
> No this isn't what you need. The _lock is the PlatformMonitor. You lock/unlock in AsyncLogLocker for the critical regions, and then use the wait/notify operations for the coordination.

you mean I should use os::PlatformMonitor _lock as a combination of mutux and cv, right?

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

PR: https://git.openjdk.java.net/jdk17/pull/216


More information about the hotspot-runtime-dev mailing list