src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
branchstuefe-new-metaspace-branch
changeset 58199 595fcbebaa77
parent 58063 bdf136b8ae0e
parent 58190 9adf95692a3d
child 58494 54c1ba464b78
equal deleted inserted replaced
58107:69c38b90014c 58199:595fcbebaa77
  1920     jbyte prev = _cancelled_gc.cmpxchg(CANCELLED, CANCELLABLE);
  1920     jbyte prev = _cancelled_gc.cmpxchg(CANCELLED, CANCELLABLE);
  1921     if (prev == CANCELLABLE) return true;
  1921     if (prev == CANCELLABLE) return true;
  1922     else if (prev == CANCELLED) return false;
  1922     else if (prev == CANCELLED) return false;
  1923     assert(ShenandoahSuspendibleWorkers, "should not get here when not using suspendible workers");
  1923     assert(ShenandoahSuspendibleWorkers, "should not get here when not using suspendible workers");
  1924     assert(prev == NOT_CANCELLED, "must be NOT_CANCELLED");
  1924     assert(prev == NOT_CANCELLED, "must be NOT_CANCELLED");
  1925     {
  1925     if (Thread::current()->is_Java_thread()) {
  1926       // We need to provide a safepoint here, otherwise we might
  1926       // We need to provide a safepoint here, otherwise we might
  1927       // spin forever if a SP is pending.
  1927       // spin forever if a SP is pending.
  1928       ThreadBlockInVM sp(JavaThread::current());
  1928       ThreadBlockInVM sp(JavaThread::current());
  1929       SpinPause();
  1929       SpinPause();
  1930     }
  1930     }