< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/share/locks/MonitorLockingThread.java

Print this page
rev 56807 : [mq]: 8232684-v2

*** 76,86 **** /* * Wait when blockedThread's state will switch to 'BLOCKED' (at that moment monitor contention * should already occur) and then force MonitorLockingThread to release lock */ while (blockedThread.getState() != Thread.State.BLOCKED) ! yield(); lockingThread.releaseLock(); } } --- 76,86 ---- /* * Wait when blockedThread's state will switch to 'BLOCKED' (at that moment monitor contention * should already occur) and then force MonitorLockingThread to release lock */ while (blockedThread.getState() != Thread.State.BLOCKED) ! Thread.yield(); lockingThread.releaseLock(); } }
*** 96,117 **** public void run() { synchronized (lockToHold) { holdsLock = true; while (isRunning) ! yield(); } holdsLock = false; } public void releaseLock() { isRunning = false; while (holdsLock) ! yield(); } public void acquireLock() { start(); while (!holdsLock) ! yield(); } } --- 96,117 ---- public void run() { synchronized (lockToHold) { holdsLock = true; while (isRunning) ! Thread.yield(); } holdsLock = false; } public void releaseLock() { isRunning = false; while (holdsLock) ! Thread.yield(); } public void acquireLock() { start(); while (!holdsLock) ! Thread.yield(); } }
< prev index next >