RFR: 8320318: ObjectMonitor Responsible thread [v2]

Fredrik Bredberg fbredberg at openjdk.org
Tue Sep 17 13:21:10 UTC 2024


On Fri, 13 Sep 2024 15:50:13 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Fredrik Bredberg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update one, after the review
>
> src/hotspot/share/runtime/objectMonitor.cpp line 1224:
> 
>> 1222:     // falls to the new owner.
>> 1223:     //
>> 1224:     void* owner = try_set_owner_from(nullptr, current);
> 
> Is this the same code as TryLock now?  Except a little different...  Could this call TryLock and return if the lock becomes owned by another thread, like in SharedRuntime::monitor_exit_helper() ?

It seems it can call TryLock, which was also pointed out by @pchilano. Thanks for also spotting this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19454#discussion_r1763235839


More information about the hotspot-dev mailing list