RFR: 8348575: Remove unused typedef SpinLockT

David Holmes dholmes at openjdk.org
Thu Jan 30 06:16:57 UTC 2025


On Fri, 24 Jan 2025 12:05:25 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you help to review this simple patch?
> 
> SpinLockT is typedef'ed, but there is no usage of it. I think this is a legacy code from long time before. Also remove/modify some related comment.
> 
> Thanks

Good catch! That typedef has actually never been used.

A couple of minor suggestions on the comments, but I will approve ahead of time, so it doesn't get held up awaiting my re-review. Although I think this should count as trivial you will need a second review anyway if you make the suggested changes.

src/hotspot/share/runtime/thread.cpp line 557:

> 555: }
> 556: 
> 557: // Ad-hoc mutual exclusion primitives: spin lock

Suggestion:

// Ad-hoc mutual exclusion primitive: spin lock

We dropped the Mux primitive a long time ago, so there is only one

src/hotspot/share/runtime/thread.cpp line 559:

> 557: // Ad-hoc mutual exclusion primitives: spin lock
> 558: //
> 559: // We employ spin lock _only for low-contention, fixed-length

Suggestion:

// We employ a spin lock _only for low-contention, fixed-length

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23298#pullrequestreview-2583000366
PR Review Comment: https://git.openjdk.org/jdk/pull/23298#discussion_r1935059379
PR Review Comment: https://git.openjdk.org/jdk/pull/23298#discussion_r1935059875


More information about the hotspot-runtime-dev mailing list