RFR: 8356173: Remove ThreadCritical [v2]

Kim Barrett kbarrett at openjdk.org
Fri May 9 20:25:54 UTC 2025


On Fri, 9 May 2025 17:43:00 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Note that such a simple solution would also reduce the number of indirections when using this mutex. One less pointer load, one less memory access.
>
> PlatformMutex is the simple locking scheme that we use throughout the VM, so it is the right tool for the job. It is actually the same as your SimpleMutex only it had code that deals with the old macosx bug (that should be removed not with this RFE).  Actually ThreadCritical is your SimpleMutex except has to be reimplemented on both windows and posix, which again is already the same as PlatformMutex.
> 
>>  I mean that's Unix 101. MacOS should be able to do that at least.
> 
> My crash suggests otherwise.  Maybe it's a bug in PlatformMutex.  I'd rather fix that.

https://bugs.openjdk.org/browse/JDK-8220805 is still lingering? Looks like it was decided to fix it some time
ago, but that still hasn't happened.  That's likely what is causing the crash @coleenp encountered.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25072#discussion_r2082442990


More information about the hotspot-dev mailing list