Home
last modified time | relevance | path

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

12

/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/luni/src/main/java/java/util/concurrent/
DSemaphore.java136 private final Sync sync; field in Semaphore
242 sync = new NonfairSync(permits); in Semaphore()
257 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()
289 sync.acquireSharedInterruptibly(1); in acquire()
312 sync.acquireShared(1); in acquireUninterruptibly()
340 return sync.nonfairTryAcquireShared(1) >= 0; in tryAcquire()
386 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryAcquire()
403 sync.releaseShared(1); in release()
446 sync.acquireSharedInterruptibly(permits); in acquire()
475 sync.acquireShared(permits); in acquireUninterruptibly()
[all …]
DCountDownLatch.java161 private final Sync sync; field in CountDownLatch
172 this.sync = new Sync(count); in CountDownLatch()
203 sync.acquireSharedInterruptibly(1); in await()
249 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in await()
263 sync.releaseShared(1); in countDown()
274 return sync.getCount(); in getCount()
285 return super.toString() + "[Count = " + sync.getCount() + "]"; in toString()
/libcore/luni/src/main/java/java/util/concurrent/locks/
DReentrantLock.java82 private final Sync sync; field in ReentrantLock
234 sync = new NonfairSync(); in ReentrantLock()
244 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantLock()
262 sync.lock(); in lock()
312 sync.acquireInterruptibly(1); in lockInterruptibly()
342 return sync.nonfairTryAcquire(1); in tryLock()
419 return sync.tryAcquireNanos(1, unit.toNanos(timeout)); in tryLock()
434 sync.release(1); in unlock()
477 return sync.newCondition(); in newCondition()
510 return sync.getHoldCount(); in getHoldCount()
[all …]
DReentrantReadWriteLock.java196 final Sync sync; field in ReentrantReadWriteLock
213 sync = fair ? new FairSync() : new NonfairSync(); in ReentrantReadWriteLock()
677 private final Sync sync; field in ReentrantReadWriteLock.ReadLock
686 sync = lock.sync; in ReadLock()
700 sync.acquireShared(1); in lock()
745 sync.acquireSharedInterruptibly(1); in lockInterruptibly()
772 return sync.tryReadLock(); in tryLock()
844 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryLock()
859 sync.releaseShared(1); in unlock()
880 int r = sync.getReadLockCount(); in toString()
[all …]
DAbstractQueuedLongSynchronizer.java1718 final boolean isOwnedBy(AbstractQueuedLongSynchronizer sync) { in isOwnedBy() argument
1719 return sync == AbstractQueuedLongSynchronizer.this; in isOwnedBy()
DAbstractQueuedSynchronizer.java2187 final boolean isOwnedBy(AbstractQueuedSynchronizer sync) { in isOwnedBy() argument
2188 return sync == AbstractQueuedSynchronizer.this; in isOwnedBy()
/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/src/main/java/java/io/
DFileDescriptor.java130 public native void sync() throws SyncFailedException; in sync() method in FileDescriptor
DRandomAccessFile.java250 fd.sync(); in RandomAccessFile()
481 fd.sync(); in writeBytes()
600 fd.sync(); in setLength()
/libcore/luni/src/test/java/libcore/java/io/
DFileDescriptorTest.java30 new RandomAccessFile(f, "r").getFD().sync(); in testReadOnlyFileDescriptorSync()
/libcore/ojluni/src/main/native/
DFileDescriptor_md.c72 NATIVE_METHOD(FileDescriptor, sync, "()V"),
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DThreadTest.java457 boolean sync; in test_interrupt() field in ThreadTest.ChildThread1
461 if (sync) { in test_interrupt()
473 public ChildThread1(Thread p, String name, boolean sync) { in test_interrupt() argument
476 this.sync = sync; in test_interrupt()
/libcore/tzdata/update/src/main/libcore/tzdata/update/
DConfigBundle.java94 fos.getFD().sync(); in extractZipSafely()
/libcore/luni/src/test/java/libcore/java/util/prefs/
DPreferencesTest.java90 userPreferences.sync(); in testPreferencesClobbersExistingFiles()
DOldPreferencesTest.java109 p.sync(); in testAbstractMethods()
1110 public void sync() throws BackingStoreException { in sync() method in OldPreferencesTest.MockPreferences
DOldAbstractPreferencesTest.java873 pref.sync(); in testSync()
878 pref.sync(); in testSync()
/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()
DPreferencesTest.java411 public void sync() throws BackingStoreException { in sync() method in PreferencesTest.MockPreferences
/libcore/ojluni/src/main/java/java/util/prefs/
DFileSystemPreferences.java716 public synchronized void sync() throws BackingStoreException {
746 super.sync();
814 sync();
DPreferences.java1034 public abstract void sync() throws BackingStoreException; in sync() method in Preferences

12