8199735: Mark word updates need to use Access API

Reviewed-by: shade, eosterlund
This commit is contained in:
Roman Kennke 2018-04-05 10:54:53 +02:00
parent a47dc291ae
commit 389d720746
39 changed files with 205 additions and 149 deletions

View file

@ -275,7 +275,7 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
markOop disp = lockee->mark()->set_unlocked();
monitor->lock()->set_displaced_header(disp);
if (Atomic::cmpxchg((markOop)monitor, lockee->mark_addr(), disp) != disp) {
if (lockee->cas_set_mark((markOop)monitor, disp) != disp) {
if (thread->is_lock_owned((address) disp->clear_lock_bits())) {
monitor->lock()->set_displaced_header(NULL);
}