RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v12]

Coleen Phillimore coleenp at openjdk.org
Mon Dec 8 12:43:02 UTC 2025


On Mon, 8 Dec 2025 09:21:25 GMT, Anton Artemov <aartemov at openjdk.org> wrote:

>> Coleen I am not at all sure what you mean by that. The "safe" implementation has to use library-based TLS, rather than language/compiler-based as the latter is definitely not signal-safe while the former is deemed safe enough for reading TLS values. Because the safe version can be called very early in VM init we have to check the library-based TLS is initilalized.
>
> I think we don't want complication as the one that David described in this supposedly simple utility object. Let's just use the unsafe version and document when it should not be used.

> Because the safe version can be called very early in VM init we have to check the library-based TLS is initilalized.

Can the ParkEvent not be called very early in VM init as well?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2598467366


More information about the hotspot-dev mailing list