RFR: 8256474: Migrate Mutex _owner accesses to use Atomic operations [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Dec 1 12:26:59 UTC 2020
On Tue, 1 Dec 2020 12:21:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/runtime/mutex.hpp line 90:
>>
>>> 88: // than the lock owner are inherently racy.
>>> 89: Thread* volatile _owner;
>>> 90: void raw_set_owner(Thread* new_owner) { Atomic::store(&_owner, new_owner); }
>>
>> set_owner_relaxed might be a better name. Your call...
>
> Don't like 'relaxed'. I'm not a huge fan of raw, since it's not raw here, but leave it. It's fine.
Thanks for restoring 'volatile'.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1402
More information about the hotspot-runtime-dev
mailing list