RFR: 8256474: Migrate Mutex _owner accesses to use Atomic operations [v3]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Dec 1 12:26:58 UTC 2020
On Fri, 27 Nov 2020 08:46:40 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Restore volatile modifier
>
> 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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1402
More information about the hotspot-runtime-dev
mailing list