src/hotspot/share/runtime/synchronizer.cpp
changeset 48488 51825789dd89
parent 48105 8d15b1369c7a
child 49360 886acec3b4c6
equal deleted inserted replaced
48487:abf1d797e380 48488:51825789dd89
   236     // stack-locking in the object's header, the third check is for
   236     // stack-locking in the object's header, the third check is for
   237     // recursive stack-locking in the displaced header in the BasicLock,
   237     // recursive stack-locking in the displaced header in the BasicLock,
   238     // and last are the inflated Java Monitor (ObjectMonitor) checks.
   238     // and last are the inflated Java Monitor (ObjectMonitor) checks.
   239     lock->set_displaced_header(markOopDesc::unused_mark());
   239     lock->set_displaced_header(markOopDesc::unused_mark());
   240 
   240 
   241     if (owner == NULL &&
   241     if (owner == NULL && Atomic::replace_if_null(Self, &(m->_owner))) {
   242         Atomic::cmpxchg(Self, &(m->_owner), (void*)NULL) == NULL) {
       
   243       assert(m->_recursions == 0, "invariant");
   242       assert(m->_recursions == 0, "invariant");
   244       assert(m->_owner == Self, "invariant");
   243       assert(m->_owner == Self, "invariant");
   245       return true;
   244       return true;
   246     }
   245     }
   247   }
   246   }