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

12

/libcore/jsr166-tests/src/test/java/jsr166/
H A DAbstractQueuedLongSynchronizerTest.java112 final Mutex sync; field in class:AbstractQueuedLongSynchronizerTest.InterruptibleSyncRunnable
113 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } argument
115 sync.acquireInterruptibly();
124 final Mutex sync; field in class:AbstractQueuedLongSynchronizerTest.InterruptedSyncRunnable
125 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } argument
127 sync
137 waitForQueuedThread(AbstractQueuedLongSynchronizer sync, Thread t) argument
151 assertHasQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument
165 assertHasExclusiveQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument
177 assertHasSharedQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument
190 assertHasWaitersUnlocked(Mutex sync, ConditionObject c, Thread... threads) argument
200 assertHasWaitersLocked(Mutex sync, ConditionObject c, Thread... threads) argument
[all...]
H A DAbstractQueuedSynchronizerTest.java116 final Mutex sync; field in class:AbstractQueuedSynchronizerTest.InterruptibleSyncRunnable
117 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } argument
119 sync.acquireInterruptibly();
128 final Mutex sync; field in class:AbstractQueuedSynchronizerTest.InterruptedSyncRunnable
129 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } argument
131 sync
141 waitForQueuedThread(AbstractQueuedSynchronizer sync, Thread t) argument
154 assertHasQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument
168 assertHasExclusiveQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument
180 assertHasSharedQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument
193 assertHasWaitersUnlocked(Mutex sync, ConditionObject c, Thread... threads) argument
203 assertHasWaitersLocked(Mutex sync, ConditionObject c, Thread... threads) argument
[all...]
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DSemaphore.java165 private final Sync sync; field in class:Semaphore
271 sync = new NonfairSync(permits);
286 sync = fair ? new FairSync(permits) : new NonfairSync(permits);
318 sync.acquireSharedInterruptibly(1);
341 sync.acquireShared(1);
369 return sync.nonfairTryAcquireShared(1) >= 0;
415 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
432 sync.releaseShared(1);
475 sync.acquireSharedInterruptibly(permits);
504 sync
[all...]
H A DCountDownLatch.java190 private final Sync sync; field in class:CountDownLatch
201 this.sync = new Sync(count);
232 sync.acquireSharedInterruptibly(1);
278 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
292 sync.releaseShared(1);
303 return sync.getCount();
314 return super.toString() + "[Count = " + sync.getCount() + "]";
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
H A DReentrantLock.java110 private final Sync sync; field in class:ReentrantLock
258 sync = new NonfairSync();
268 sync = fair ? new FairSync() : new NonfairSync();
286 sync.lock();
336 sync.acquireInterruptibly(1);
366 return sync.nonfairTryAcquire(1);
443 return sync.tryAcquireNanos(1, unit.toNanos(timeout));
458 sync.release(1);
501 return sync.newCondition();
534 return sync
[all...]
H A DReentrantReadWriteLock.java225 final Sync sync; field in class:ReentrantReadWriteLock
242 sync = fair ? new FairSync() : new NonfairSync();
706 private final Sync sync; field in class:ReentrantReadWriteLock.ReadLock
715 sync = lock.sync;
729 sync.acquireShared(1);
774 sync.acquireSharedInterruptibly(1);
801 return sync.tryReadLock();
873 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
888 sync
920 private final Sync sync; field in class:ReentrantReadWriteLock.WriteLock
[all...]
H A DAbstractQueuedLongSynchronizer.java68 To keep sources in sync, the remainder of this source file is
70 name and changing ints related with sync state to longs. Please
1181 * a condition queue, is now waiting to reacquire on sync queue.
1202 * Returns true if node is on sync queue by searching backwards from tail.
1220 * Transfers a node from a condition queue onto sync queue.
1247 * Transfers node, if necessary, to sync queue after a cancelled wait.
1273 * @return previous sync state
1747 final boolean isOwnedBy(AbstractQueuedLongSynchronizer sync) { argument
1748 return sync == AbstractQueuedLongSynchronizer.this;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DTimerTaskTest.java30 private final Object sync = new Object(); field in class:TimerTaskTest.TimerTestTask
53 synchronized (sync) {
54 sync.notify();
184 synchronized (testTask.sync) {
186 testTask.sync.wait(500);
206 synchronized (testTask.sync) {
208 testTask.sync.wait(500);
H A DTimerTest.java35 private final Object sync = new Object(); field in class:TimerTest
80 synchronized (sync) {
81 sync.notify();
222 synchronized (sync) {
223 sync.wait(500);
236 synchronized (sync) {
237 sync.wait(500);
249 synchronized (sync) {
250 sync.wait(200);
252 sync
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DFileDescriptorTest.java44 fd.sync();
51 fd.sync();
56 fd.sync();
H A DSyncFailedExceptionTest.java38 fd.sync();
/libcore/luni/src/test/java/libcore/java/io/
H A DFileDescriptorTest.java30 new RandomAccessFile(f, "r").getFD().sync();
/libcore/ojluni/src/main/java/java/io/
H A DFileDescriptor.java115 * system, sync will not return until all in-memory modified copies
119 * sync is meant to be used by code that requires physical
122 * might use sync to ensure that all changes to a file caused
125 * sync only affects buffers downstream of this FileDescriptor. If
129 * OutputStream.flush) before that data will be affected by sync.
137 public native void sync() throws SyncFailedException; method in class:FileDescriptor
H A DRandomAccessFile.java298 fd.sync();
/libcore/ojluni/src/main/native/
H A DFileDescriptor_md.c61 JNU_ThrowByName(env, "java/io/SyncFailedException", "sync failed");
72 NATIVE_METHOD(FileDescriptor, sync, "()V"),
/libcore/ojluni/src/main/java/sun/nio/fs/
H A DUnixChannelFactory.java65 boolean sync; field in class:UnixChannelFactory.Flags
81 case SYNC : flags.sync = true; break;
236 if (flags.sync)
/libcore/luni/src/test/java/libcore/java/util/prefs/
H A DPreferencesTest.java90 userPreferences.sync();
H A DOldAbstractPreferencesTest.java873 pref.sync();
878 pref.sync();
H A DOldPreferencesTest.java109 p.sync();
1110 public void sync() throws BackingStoreException { method in class:OldPreferencesTest.MockPreferences
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DThreadTest.java458 boolean sync;
462 if (sync) {
474 public ChildThread1(Thread p, String name, boolean sync) {
477 this.sync = sync;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
H A DAbstractPreferencesTest.java806 pref.sync();
812 p.sync();
823 p.sync();
830 child.sync();
838 child.sync();
1104 p.sync();
1232 p.sync();
1317 p.sync();
1496 pref.sync();
H A DPreferencesTest.java411 public void sync() throws BackingStoreException { method in class:PreferencesTest.MockPreferences
/libcore/ojluni/src/main/java/java/util/prefs/
H A DPreferences.java1015 * @see #sync()
1022 * store (from any VM) prior to the <tt>sync</tt> invocation. As a
1034 public abstract void sync() throws BackingStoreException; method in class:Preferences
H A DFileSystemPreferences.java45 * (The file lock is obtained only for sync(), flush() and removeNode().)
268 * the sync operation, changes are first saved into this file, and then
313 * corresponding disk file (prefsFile) by the sync operation. The initial
347 * is sync'ed by overwriting our prefsCache with the preference map last
402 * next sync.
481 // These 2 things guarantee node will get wrtten at next flush/sync
514 // These 2 things guarantee node will get wrtten at next flush/sync
716 public synchronized void sync() throws BackingStoreException { method in class:FileSystemPreferences
746 super.sync();
779 // playback any local mods since last sync
[all...]
H A DAbstractPreferences.java76 * {@link Preferences#sync()}. Generally speaking, these SPI methods should not
82 * of <tt>flush()</tt> and <tt>sync</tt> should return <tt>false</tt>, as
1276 * Implements the <tt>sync</tt> method as per the specification in
1277 * {@link Preferences#sync()}.
1295 public void sync() throws BackingStoreException { method in class:AbstractPreferences
1322 * sync(), rather than merely overriding this method.
1325 * will propagate out beyond the enclosing {@link #sync()} invocation.

Completed in 1625 milliseconds

12