Skip to content

Commit

Permalink
Merge pull request #4844 from babsingh/update_spinOnFlatLock
Browse files Browse the repository at this point in the history
Remove the unneeded if statement in ObjectMonitor.cpp::spinOnFlatLock
  • Loading branch information
gacholio committed Mar 5, 2019
2 parents 1bb5803 + c40eeb0 commit b9dee51
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions runtime/vm/ObjectMonitor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2001, 2018 IBM Corp. and others
* Copyright (c) 2001, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -407,13 +407,11 @@ spinOnFlatLock(J9VMThread *currentThread, j9objectmonitor_t volatile *lwEA, j9ob
{
if (nestedPath) {
VM_AtomicSupport::yieldCPU();
if (0 != spinCount1) {
VM_AtomicSupport::dropSMTThreadPriority();
for (UDATA _spinCount1 = spinCount1; _spinCount1 > 0; _spinCount1--) {
VM_AtomicSupport::nop();
} /* end tight loop */
VM_AtomicSupport::restoreSMTThreadPriority();
}
VM_AtomicSupport::dropSMTThreadPriority();
for (UDATA _spinCount1 = spinCount1; _spinCount1 > 0; _spinCount1--) {
VM_AtomicSupport::nop();
} /* end tight loop */
VM_AtomicSupport::restoreSMTThreadPriority();
}
} else {
goto done;
Expand Down

0 comments on commit b9dee51

Please sign in to comment.