< prev index next >
src/hotspot/share/runtime/synchronizer.cpp
Print this page
@@ -349,11 +349,11 @@
// Fall through to inflate() ...
} else if (mark.has_locker() &&
THREAD->is_lock_owned((address)mark.locker())) {
assert(lock != mark.locker(), "must not re-lock the same lock");
assert(lock != (BasicLock*)obj->mark().value(), "don't relock with same BasicLock");
- lock->set_displaced_header(markWord(0));
+ lock->set_displaced_header(markWord::from_pointer(NULL));
return;
}
// The object header will never be displaced to this lock,
// so it does not matter what the value is, except that it
@@ -716,16 +716,16 @@
// object should remain ineligible for biased locking
assert(!mark.has_bias_pattern(), "invariant");
if (mark.is_neutral()) {
- hash = mark.hash(); // this is a normal header
+ hash = mark.hash(); // this is a normal header
if (hash != 0) { // if it has hash, just return it
return hash;
}
hash = get_next_hash(Self, obj); // allocate a new hash code
- temp = mark.copy_set_hash(hash); // merge the hash code into header
+ temp = mark.copy_set_hash(hash); // merge the hash code into header
// use (machine word version) atomic operation to install the hash
test = obj->cas_set_mark(temp, mark);
if (test == mark) {
return hash;
}
@@ -1475,11 +1475,11 @@
m->set_object(object);
m->_Responsible = NULL;
m->_SpinDuration = ObjectMonitor::Knob_SpinLimit; // consider: keep metastats by type/class
if (object->cas_set_mark(markWord::encode(m), mark) != mark) {
- m->set_header(markWord(0));
+ m->set_header(markWord(markWord::zero));
m->set_object(NULL);
m->Recycle();
omRelease(Self, m, true);
m = NULL;
continue;
< prev index next >