RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v5]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Thu Oct 24 03:38:22 UTC 2024
On Wed, 23 Oct 2024 05:43:53 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address David's comments to ObjectMonitor.hpp
>
> src/hotspot/share/runtime/objectMonitor.hpp line 302:
>
>> 300: void set_owner_from(int64_t old_value, JavaThread* current);
>> 301: // Set _owner field to tid of current thread; current value must be ANONYMOUS_OWNER.
>> 302: void set_owner_from_BasicLock(JavaThread* current);
>
> Shouldn't tid there be the basicLock?
So the value stored in _owner has to be ANONYMOUS_OWNER. We cannot store the BasicLock* in there as before since it can clash with some other thread's tid. We store it in the new field _stack_locker instead.
> src/hotspot/share/runtime/objectMonitor.hpp line 334:
>
>> 332:
>> 333: // Returns true if BasicLock* stored in _stack_locker
>> 334: // points to current's stack, false othwerwise.
>
> Suggestion:
>
> // points to current's stack, false otherwise.
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1814187730
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1814187856
More information about the nio-dev
mailing list