Home
last modified time | relevance | path

Searched refs:sync (Results 1 – 25 of 32) sorted by relevance

12

/libcore/ojluni/src/test/java/util/concurrent/tck/
DAbstractQueuedLongSynchronizerTest.java135 final Mutex sync; field in AbstractQueuedLongSynchronizerTest.InterruptibleSyncRunnable
136 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptibleSyncRunnable() argument
138 sync.acquireInterruptibly(); in realRun()
147 final Mutex sync; field in AbstractQueuedLongSynchronizerTest.InterruptedSyncRunnable
148 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptedSyncRunnable() argument
150 sync.acquireInterruptibly(); in realRun()
160 void waitForQueuedThread(AbstractQueuedLongSynchronizer sync, in waitForQueuedThread() argument
163 while (!sync.isQueued(t)) { in waitForQueuedThread()
174 void assertHasQueuedThreads(AbstractQueuedLongSynchronizer sync, in assertHasQueuedThreads() argument
176 Collection<Thread> actual = sync.getQueuedThreads(); in assertHasQueuedThreads()
[all …]
DAbstractQueuedSynchronizerTest.java139 final Mutex sync; field in AbstractQueuedSynchronizerTest.InterruptibleSyncRunnable
140 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptibleSyncRunnable() argument
142 sync.acquireInterruptibly(); in realRun()
151 final Mutex sync; field in AbstractQueuedSynchronizerTest.InterruptedSyncRunnable
152 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptedSyncRunnable() argument
154 sync.acquireInterruptibly(); in realRun()
164 void waitForQueuedThread(AbstractQueuedSynchronizer sync, Thread t) { in waitForQueuedThread() argument
166 while (!sync.isQueued(t)) { in waitForQueuedThread()
177 void assertHasQueuedThreads(AbstractQueuedSynchronizer sync, in assertHasQueuedThreads() argument
179 Collection<Thread> actual = sync.getQueuedThreads(); in assertHasQueuedThreads()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DAbstractQueuedLongSynchronizerTest.java112 final Mutex sync; field in AbstractQueuedLongSynchronizerTest.InterruptibleSyncRunnable
113 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptibleSyncRunnable() argument
115 sync.acquireInterruptibly(); in realRun()
124 final Mutex sync; field in AbstractQueuedLongSynchronizerTest.InterruptedSyncRunnable
125 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptedSyncRunnable() argument
127 sync.acquireInterruptibly(); in realRun()
137 void waitForQueuedThread(AbstractQueuedLongSynchronizer sync, in waitForQueuedThread() argument
140 while (!sync.isQueued(t)) { in waitForQueuedThread()
151 void assertHasQueuedThreads(AbstractQueuedLongSynchronizer sync, in assertHasQueuedThreads() argument
153 Collection<Thread> actual = sync.getQueuedThreads(); in assertHasQueuedThreads()
[all …]
DAbstractQueuedSynchronizerTest.java116 final Mutex sync; field in AbstractQueuedSynchronizerTest.InterruptibleSyncRunnable
117 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptibleSyncRunnable() argument
119 sync.acquireInterruptibly(); in realRun()
128 final Mutex sync; field in AbstractQueuedSynchronizerTest.InterruptedSyncRunnable
129 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } in InterruptedSyncRunnable() argument
131 sync.acquireInterruptibly(); in realRun()
141 void waitForQueuedThread(AbstractQueuedSynchronizer sync, Thread t) { in waitForQueuedThread() argument
143 while (!sync.isQueued(t)) { in waitForQueuedThread()
154 void assertHasQueuedThreads(AbstractQueuedSynchronizer sync, in assertHasQueuedThreads() argument
156 Collection<Thread> actual = sync.getQueuedThreads(); in assertHasQueuedThreads()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DSemaphore.java165 private final Sync sync; field in Semaphore
271 sync = new NonfairSync(permits); in Semaphore()
286 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()
318 sync.acquireSharedInterruptibly(1); in acquire()
341 sync.acquireShared(1); in acquireUninterruptibly()
369 return sync.nonfairTryAcquireShared(1) >= 0; in tryAcquire()
415 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryAcquire()
432 sync.releaseShared(1); in release()
475 sync.acquireSharedInterruptibly(permits); in acquire()
504 sync.acquireShared(permits); in acquireUninterruptibly()
[all …]
DCountDownLatch.java190 private final Sync sync; field in CountDownLatch
201 this.sync = new Sync(count); in CountDownLatch()
232 sync.acquireSharedInterruptibly(1); in await()
278 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in await()
292 sync.releaseShared(1); in countDown()
303 return sync.getCount(); in getCount()
314 return super.toString() + "[Count = " + sync.getCount() + "]"; in toString()
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DReentrantLock.java110 private final Sync sync; field in ReentrantLock
266 sync = new NonfairSync(); in ReentrantLock()
276 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantLock()
294 sync.lock(); in lock()
344 sync.acquireInterruptibly(1); in lockInterruptibly()
374 return sync.nonfairTryAcquire(1); in tryLock()
451 return sync.tryAcquireNanos(1, unit.toNanos(timeout)); in tryLock()
466 sync.release(1); in unlock()
509 return sync.newCondition(); in newCondition()
542 return sync.getHoldCount(); in getHoldCount()
[all …]
DReentrantReadWriteLock.java225 final Sync sync; field in ReentrantReadWriteLock
242 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantReadWriteLock()
706 private final Sync sync; field in ReentrantReadWriteLock.ReadLock
715 sync = lock.sync; in ReadLock()
729 sync.acquireShared(1); in lock()
774 sync.acquireSharedInterruptibly(1); in lockInterruptibly()
801 return sync.tryReadLock(); in tryLock()
873 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryLock()
888 sync.releaseShared(1); in unlock()
909 int r = sync.getReadLockCount(); in toString()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DTimerTaskTest.java30 private final Object sync = new Object(); field in TimerTaskTest.TimerTestTask
53 synchronized (sync) { in run()
54 sync.notify(); in run()
184 synchronized (testTask.sync) { in test_scheduledExecutionTime()
186 testTask.sync.wait(500); in test_scheduledExecutionTime()
206 synchronized (testTask.sync) { in test_scheduledExecutionTime()
208 testTask.sync.wait(500); in test_scheduledExecutionTime()
DTimerTest.java35 private final Object sync = new Object(); field in TimerTest
80 synchronized (sync) { in run()
81 sync.notify(); in run()
222 synchronized (sync) { in test_cancel()
223 sync.wait(500); in test_cancel()
236 synchronized (sync) { in test_cancel()
237 sync.wait(500); in test_cancel()
249 synchronized (sync) { in test_cancel()
250 sync.wait(200); in test_cancel()
252 sync.wait(200); in test_cancel()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileDescriptorTest.java44 fd.sync(); in test_sync()
51 fd.sync(); in test_sync()
56 fd.sync(); in test_sync()
DSyncFailedExceptionTest.java38 fd.sync(); in test_ConstructorLjava_lang_String()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/locks/
DReentrantLock.java132 private final java.util.concurrent.locks.ReentrantLock.Sync sync; field in ReentrantLock
135 sync = null;
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixChannelFactory.java65 boolean sync; field in UnixChannelFactory.Flags
81 case SYNC : flags.sync = true; break; in toFlags()
236 if (flags.sync) in open()
/libcore/ojluni/annotations/hiddenapi/java/io/
DFileDescriptor.java45 public native void sync() throws java.io.SyncFailedException; in sync() method in FileDescriptor
/libcore/ojluni/src/main/native/
DFileDescriptor_md.c74 NATIVE_METHOD(FileDescriptor, sync, "()V"),
/libcore/ojluni/annotations/mmodule/java/io/
DFileDescriptor.annotated.java37 public native void sync() throws java.io.SyncFailedException; in sync() method in FileDescriptor
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DThreadTest.java458 boolean sync; in test_interrupt() field in ThreadTest.ChildThread1
462 if (sync) { in test_interrupt()
474 public ChildThread1(Thread p, String name, boolean sync) { in test_interrupt() argument
477 this.sync = sync; in test_interrupt()
/libcore/ojluni/src/main/java/java/io/
DFileDescriptor.java146 public native void sync() throws SyncFailedException; in sync() method in FileDescriptor
DRandomAccessFile.java300 fd.sync(); in maybeSync()
/libcore/luni/src/test/java/libcore/java/io/
DFileDescriptorTest.java35 new RandomAccessFile(f, "r").getFD().sync(); in testReadOnlyFileDescriptorSync()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
DAbstractPreferencesTest.java806 pref.sync(); in testSync()
812 p.sync(); in testSync()
823 p.sync(); in testSync()
830 child.sync(); in testSync()
838 child.sync(); in testSync()
1104 p.sync(); in testBackingStoreException()
1232 p.sync(); in testRuntimeException()
1317 p.sync(); in testSPIReturnNull()
1496 pref.sync(); in testIllegalStateException()
/libcore/luni/src/test/java/libcore/java/util/prefs/
DPreferencesTest.java91 userPreferences.sync(); in testPreferencesClobbersExistingFiles()
/libcore/ojluni/src/main/java/java/util/prefs/
DFileSystemPreferences.java716 public synchronized void sync() throws BackingStoreException {
746 super.sync();
814 sync();
DPreferences.java1124 public abstract void sync() throws BackingStoreException; in sync() method in Preferences

12