Home
last modified time | relevance | path

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

/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/
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/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 …]
DAbstractQueuedLongSynchronizer.java1747 final boolean isOwnedBy(AbstractQueuedLongSynchronizer sync) { in isOwnedBy() argument
1748 return sync == AbstractQueuedLongSynchronizer.this; in isOwnedBy()
/libcore/ojluni/src/main/java/java/util/concurrent/
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/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/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/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/luni/src/test/java/libcore/java/util/prefs/
DPreferencesTest.java91 userPreferences.sync(); in testPreferencesClobbersExistingFiles()
DOldAbstractPreferencesTest.java874 pref.sync(); in testSync()
879 pref.sync(); in testSync()
/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
DAbstractPreferences.java1357 public void sync() throws BackingStoreException {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
DPreferencesTest.java411 public void sync() throws BackingStoreException { in sync() method in PreferencesTest.MockPreferences