Lines Matching refs:lock
219 private final Object lock; field in Main.TimedWait
221 public TimedWait(Object lock) { in TimedWait() argument
222 this.lock = lock; in TimedWait()
227 synchronized (lock) { in perform()
229 lock.wait(SLEEP_TIME, 0); in perform()
238 private final Object lock; field in Main.Wait
240 public Wait(Object lock) { in Wait() argument
241 this.lock = lock; in Wait()
246 synchronized (lock) { in perform()
248 lock.wait(); in perform()
269 private final Object lock; field in Main.SyncAndWork
271 public SyncAndWork(Object lock) { in SyncAndWork() argument
272 this.lock = lock; in SyncAndWork()
277 synchronized (lock) { in perform()
327 private final static Map<Operation, Double> createDefaultFrequencyMap(Object lock, in createDefaultFrequencyMap() argument
339 frequencyMap.put(new TimedWait(lock), 0.05); // 10/200 in createDefaultFrequencyMap()
340 frequencyMap.put(new Wait(lock), 0.075); // 15/200 in createDefaultFrequencyMap()
356 private final static Map<Operation, Double> createLockFrequencyMap(Object lock) { in createLockFrequencyMap() argument
359 frequencyMap.put(new TimedWait(lock), 0.1); // 20/200 in createLockFrequencyMap()
360 frequencyMap.put(new Wait(lock), 0.2); // 40/200 in createLockFrequencyMap()
361 frequencyMap.put(new SyncAndWork(lock), 0.4); // 80/200 in createLockFrequencyMap()
373 Object lock, Semaphore semaphore, String arg) { in updateFrequencyMap() argument
405 op = new Wait(lock); in updateFrequencyMap()
407 op = new TimedWait(lock); in updateFrequencyMap()
411 op = new SyncAndWork(lock); in updateFrequencyMap()
449 Object lock = new Object(); in parseAndRun() local
472 frequencyMap = createLockFrequencyMap(lock); in parseAndRun()
481 frequencyMap = updateFrequencyMap(frequencyMap, lock, semaphore, args[i]); in parseAndRun()
509 frequencyMap = createDefaultFrequencyMap(lock, semaphore); in parseAndRun()
518 runTest(numberOfThreads, numberOfDaemons, operationsPerThread, lock, frequencyMap); in parseAndRun()
598 final int operationsPerThread, final Object lock, in runTest() argument
637 ? new Main(lock, t, operations) in runTest()
638 : new Daemon(lock, t, operations, mainThread, startBarrier); in runTest()
715 if (lock != null) { in runTest()
719 synchronized (lock) { in runTest()
720 lock.notifyAll(); in runTest()
754 private final Object lock; field in Main
759 private Main(Object lock, int id, Operation[] operations) { in Main() argument
760 this.lock = lock; in Main()
790 private Daemon(Object lock, in Daemon() argument
795 super(lock, id, operations); in Daemon()