RFR: 8255582: Introduce SemaphoreLock and SemaphoreLocker
Stefan Karlsson
stefank at openjdk.java.net
Thu Oct 29 13:23:42 UTC 2020
On Thu, 29 Oct 2020 13:14:45 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> For low-level locks, an alternative could be to use PlatformMutex.
>
>> For low-level locks, an alternative could be to use PlatformMutex.
>
> Sounds like a good idea. Though, I think that class needs to be brought out to its own header, or out of os::, so that I don't have to include os.hpp whenever a forward declaration would be enough.
I'm closing this PR, given the other available alternatives.
Though I must say, I don't think it's fair to use an "imminent rewrite of the lock ranking" as a motivation to push back on my wish to use some kind of locking that doesn't force me to fake a lock order when the code intend to be a leaf operation. A lock ranking rewrite has been discussed for over a decade now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/927
More information about the hotspot-dev
mailing list