< prev index next >

src/hotspot/cpu/s390/macroAssembler_s390.cpp

Print this page
@@ -3261,12 +3261,13 @@
    // The object's monitor m is unlocked iff m->owner is null,
    // otherwise m->owner may contain a thread or a stack address.
    //
    // Try to CAS m->owner from null to current thread.
    z_lghi(zero, 0);
-   // If m->owner is null, then csg succeeds and sets m->owner=THREAD and CR=EQ.
-   z_csg(zero, Z_thread, OM_OFFSET_NO_MONITOR_VALUE_TAG(owner), monitor_tagged);
+   // If m->owner is null, then csg succeeds and sets m->owner=THREAD_ID and CR=EQ.
+   z_l(Z_R1_scratch, Address(Z_thread, JavaThread::lock_id_offset()));
+   z_csg(zero, Z_R1_scratch, OM_OFFSET_NO_MONITOR_VALUE_TAG(owner), monitor_tagged);
    if (LockingMode != LM_LIGHTWEIGHT) {
      // Store a non-null value into the box.
      z_stg(box, BasicLock::displaced_header_offset_in_bytes(), box);
    }
  #ifdef ASSERT
< prev index next >