RFR: 8319799: Recursive lightweight locking: x86 implementation [v13]
Coleen Phillimore
coleenp at openjdk.org
Thu Jan 25 15:22:29 UTC 2024
On Thu, 25 Jan 2024 13:42:20 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> There is no clear satisfying solution for this. Either multiple function names `lightweight_{unlock,lock}_with_thread` , using an extra bool argument to signal that the thread is loaded, or overload the type one with `Register` the other with `Register*`.
>>
>> I tried something like a00f2e9e7f9b4d1abdcd5931ff8ba62c1d2de868 and 8eaa53e5cd9d3b17d16516af599f451ac4531c8b
>
> Ah, nevermind. Leave it with extra argument for thread, then.
I sort of liked the extra thread parameter so that the callers know that !LP64 needs get_thread() and not the lightweight_{un}lock. It's unfortunately inconsistent and requires an extra register, but nice that you can call it 'thread', at least until you overwrite it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16607#discussion_r1466530655
More information about the hotspot-dev
mailing list