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

Xin Liu xliu at openjdk.java.net
Fri Jul 9 01:33:51 UTC 2021


On Thu, 8 Jul 2021 09:43:11 GMT, David Holmes <david.holmes at oracle.com> wrote:

> One possibility is to change the code to use a Monitor that acts as the
asynclog lock and the wakeup mechanism, with a suitable guard in the
writing code so that we don't try to use the Monitor until after it has
been initialised (which is after the first log writes may occur).

I am not sure about that. The current code derived from there. HotSpot Monitor needs Thread::current(), but the logging event spans from the very beginning to the very end of JVM. We have to circumvent those cases. 

On the other hand, I carefully read the implementation of semaphore_signal on Darwin. I am pretty sure it returns KERN_SUCCESS when overflow happens. I added a line of comment in the last revision. Could you take a look at that?

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

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


More information about the hotspot-runtime-dev mailing list