RFR: 8256474: Migrate Mutex _owner accesses to use Atomic operations

Kim Barrett kbarrett at openjdk.java.net
Tue Nov 24 02:56:58 UTC 2020


On Tue, 24 Nov 2020 02:10:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Simple update to move away from volatile fields and use Atomic::load/store on racy accesses.
>> 
>> Thanks,
>> David
>
> src/hotspot/share/runtime/mutex.hpp line 87:
> 
>> 85:  private:
>> 86:   // The _owner field is only set by the current thread, either to itself after it has acquired
>> 87:   // the low-level _lock, or to NULL after it has released the _lock. Accesses by any thread other
> 
> s/after/before/

More specifically, since there are two "after", this is about the release of the lock.

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

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


More information about the hotspot-runtime-dev mailing list