RFR: 8256474: Migrate Mutex _owner accesses to use Atomic operations [v3]

Kim Barrett kbarrett at openjdk.java.net
Fri Nov 27 08:50:00 UTC 2020


On Tue, 24 Nov 2020 22:39:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Simple update to move away from volatile fields and use Atomic::load/store on racy accesses.
>> 
>> Thanks,
>> David
>
> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Restore volatile modifier

Marked as reviewed by kbarrett (Reviewer).

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...

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

PR: https://git.openjdk.java.net/jdk/pull/1402


More information about the hotspot-runtime-dev mailing list