/dalvik/libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ |
D | ReentrantReadWriteLockTest.java | 29 final ReentrantReadWriteLock lock; field in ReentrantReadWriteLockTest.InterruptibleLockRunnable 30 InterruptibleLockRunnable(ReentrantReadWriteLock l) { lock = l; } in InterruptibleLockRunnable() 33 lock.writeLock().lockInterruptibly(); in run() 44 final ReentrantReadWriteLock lock; field in ReentrantReadWriteLockTest.InterruptedLockRunnable 45 InterruptedLockRunnable(ReentrantReadWriteLock l) { lock = l; } in InterruptedLockRunnable() 48 lock.writeLock().lockInterruptibly(); in run() 86 rl.writeLock().lock(); in testLock() 94 rl.readLock().lock(); in testLock() 110 rl.writeLock().lock(); in testFairLock() 118 rl.readLock().lock(); in testFairLock() [all …]
|
D | ReentrantLockTest.java | 29 final ReentrantLock lock; field in ReentrantLockTest.InterruptibleLockRunnable 30 InterruptibleLockRunnable(ReentrantLock l) { lock = l; } in InterruptibleLockRunnable() 33 lock.lockInterruptibly(); in run() 44 final ReentrantLock lock; field in ReentrantLockTest.InterruptedLockRunnable 45 InterruptedLockRunnable(ReentrantLock l) { lock = l; } in InterruptedLockRunnable() 48 lock.lockInterruptibly(); in run() 84 rl.lock(); in testLock() 94 rl.lock(); in testFairLock() 126 final ReentrantLock lock = new ReentrantLock(); in testhasQueuedThreads() local 127 Thread t1 = new Thread(new InterruptedLockRunnable(lock)); in testhasQueuedThreads() [all …]
|
D | SemaphoreTest.java | 41 final Semaphore lock; field in SemaphoreTest.InterruptibleLockRunnable 42 InterruptibleLockRunnable(Semaphore l) { lock = l; } in InterruptibleLockRunnable() 45 lock.acquire(); in run() 56 final Semaphore lock; field in SemaphoreTest.InterruptedLockRunnable 57 InterruptedLockRunnable(Semaphore l) { lock = l; } in InterruptedLockRunnable() 60 lock.acquire(); in run() 316 final Semaphore lock = new Semaphore(1, false); in testHasQueuedThreads() local 317 Thread t1 = new Thread(new InterruptedLockRunnable(lock)); in testHasQueuedThreads() 318 Thread t2 = new Thread(new InterruptibleLockRunnable(lock)); in testHasQueuedThreads() 320 assertFalse(lock.hasQueuedThreads()); in testHasQueuedThreads() [all …]
|
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/ |
D | PriorityBlockingQueue.java | 73 private final ReentrantLock lock = new ReentrantLock(true); field in PriorityBlockingQueue 74 private final Condition notEmpty = lock.newCondition(); 161 final ReentrantLock lock = this.lock; in offer() local 162 lock.lock(); in offer() 169 lock.unlock(); in offer() 205 final ReentrantLock lock = this.lock; in poll() local 206 lock.lock(); in poll() 210 lock.unlock(); in poll() 215 final ReentrantLock lock = this.lock; in take() local 216 lock.lockInterruptibly(); in take() [all …]
|
D | ArrayBlockingQueue.java | 72 private final ReentrantLock lock; field in ArrayBlockingQueue 165 lock = new ReentrantLock(fair); in ArrayBlockingQueue() 166 notEmpty = lock.newCondition(); in ArrayBlockingQueue() 167 notFull = lock.newCondition(); in ArrayBlockingQueue() 222 final ReentrantLock lock = this.lock; in offer() local 223 lock.lock(); in offer() 232 lock.unlock(); in offer() 246 final ReentrantLock lock = this.lock; in put() local 247 lock.lockInterruptibly(); in put() 258 lock.unlock(); in put() [all …]
|
D | DelayQueue.java | 42 private transient final ReentrantLock lock = new ReentrantLock(); field in DelayQueue 68 private final Condition available = lock.newCondition(); 106 final ReentrantLock lock = this.lock; in offer() local 107 lock.lock(); in offer() 116 lock.unlock(); in offer() 153 final ReentrantLock lock = this.lock; in poll() local 154 lock.lock(); in poll() 162 lock.unlock(); in poll() 174 final ReentrantLock lock = this.lock; in take() local 175 lock.lockInterruptibly(); in take() [all …]
|
D | CyclicBarrier.java | 120 private final ReentrantLock lock = new ReentrantLock(); field in CyclicBarrier 122 private final Condition trip = lock.newCondition(); 165 final ReentrantLock lock = this.lock; in dowait() local 166 lock.lock(); in dowait() 225 lock.unlock(); in dowait() 410 final ReentrantLock lock = this.lock; in isBroken() local 411 lock.lock(); in isBroken() 415 lock.unlock(); in isBroken() 429 final ReentrantLock lock = this.lock; in reset() local 430 lock.lock(); in reset() [all …]
|
D | CopyOnWriteArrayList.java | 66 transient final ReentrantLock lock = new ReentrantLock(); field in CopyOnWriteArrayList 370 final ReentrantLock lock = this.lock; in set() local 371 lock.lock(); in set() 387 lock.unlock(); in set() 398 final ReentrantLock lock = this.lock; in add() local 399 lock.lock(); in add() 408 lock.unlock(); in add() 420 final ReentrantLock lock = this.lock; in add() local 421 lock.lock(); in add() 441 lock.unlock(); in add() [all …]
|
D | ScheduledThreadPoolExecutor.java | 693 private final ReentrantLock lock = new ReentrantLock(); field in ScheduledThreadPoolExecutor.DelayedWorkQueue 718 private final Condition available = lock.newCondition(); 800 final ReentrantLock lock = this.lock; in contains() local 801 lock.lock(); in contains() 805 lock.unlock(); in contains() 810 final ReentrantLock lock = this.lock; in remove() local 811 lock.lock(); in remove() 828 lock.unlock(); in remove() 833 final ReentrantLock lock = this.lock; in size() local 834 lock.lock(); in size() [all …]
|
/dalvik/libcore/luni/src/main/java/java/io/ |
D | FilterReader.java | 56 synchronized (lock) { in close() 79 synchronized (lock) { in mark() 96 synchronized (lock) { in markSupported() 113 synchronized (lock) { in read() 138 synchronized (lock) { in read() 156 synchronized (lock) { in ready() 176 synchronized (lock) { in reset() 198 synchronized (lock) { in skip()
|
D | Writer.java | 44 protected Object lock; field in Writer 52 lock = this; in Writer() 64 protected Writer(Object lock) { in Writer() argument 65 if (lock == null) { in Writer() 68 this.lock = lock; in Writer() 136 synchronized (lock) { in write() 154 synchronized (lock) { in write() 182 synchronized (lock) { in write()
|
D | Reader.java | 43 protected Object lock; field in Reader 51 lock = this; in Reader() 63 protected Reader(Object lock) { in Reader() argument 64 if (lock == null) { in Reader() 67 this.lock = lock; in Reader() 124 synchronized (lock) { in read() 230 synchronized (lock) { in skip()
|
D | LineNumberReader.java | 68 synchronized (lock) { in getLineNumber() 91 synchronized (lock) { in mark() 116 synchronized (lock) { in read() 159 synchronized (lock) { in read() 195 synchronized (lock) { in readLine() 215 synchronized (lock) { in reset() 233 synchronized (lock) { in setLineNumber() 261 synchronized (lock) { in skip()
|
D | PipedReader.java | 98 synchronized (lock) { in close() 118 synchronized (lock) { in connect() 130 synchronized (lock) { in establishConnection() 196 synchronized (lock) { in read() 238 lock.notifyAll(); in read() 239 lock.wait(1000); in read() 302 synchronized (lock) { in ready() 328 synchronized (lock) { in receive() 343 lock.notifyAll(); in receive() 345 lock.wait(1000); in receive() [all …]
|
D | CharArrayWriter.java | 50 lock = buf; in CharArrayWriter() 69 lock = buf; in CharArrayWriter() 106 synchronized (lock) { in reset() 119 synchronized (lock) { in size() 132 synchronized (lock) { in toCharArray() 148 synchronized (lock) { in toString() 184 synchronized (lock) { in write() 201 synchronized (lock) { in write() 239 synchronized (lock) { in write() 259 synchronized (lock) { in writeTo()
|
D | FilterWriter.java | 57 synchronized (lock) { in close() 71 synchronized (lock) { in flush() 94 synchronized (lock) { in write() 110 synchronized (lock) { in write() 131 synchronized (lock) { in write()
|
D | CharArrayReader.java | 107 synchronized (lock) { 145 synchronized (lock) { 178 synchronized (lock) { 230 synchronized (lock) { 258 synchronized (lock) { 277 synchronized (lock) { 298 synchronized (lock) {
|
/dalvik/libcore/luni/src/main/java/java/util/ |
D | TimerTask.java | 29 final Object lock = new Object(); field in TimerTask 51 synchronized (lock) { in getWhen() 60 synchronized (lock) { in setScheduledTime() 72 synchronized (lock) { in isScheduled() 93 synchronized (lock) { in cancel() 108 synchronized (lock) { in scheduledExecutionTime()
|
/dalvik/libcore/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/ |
D | MockPreferenceChangeListener.java | 7 private Object lock = new Object(); field in MockPreferenceChangeListener 40 synchronized (lock) { in waitForEvent() 41 lock.wait(500); in waitForEvent() 51 synchronized (lock) { in preferenceChange() 78 lock.notifyAll(); in preferenceChange() 83 synchronized (lock) { in getResult() 88 lock.wait(100); in getResult() 99 synchronized (lock) { in getChanged() 104 lock.wait(1000); in getChanged()
|
/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/internal/ |
D | LockManager.java | 56 synchronized void addLock(FileLock lock) in addLock() argument 58 long lockEnd = lock.position() + lock.size(); in addLock() 66 if (existingLock.overlaps(lock.position(), lock.size())) { in addLock() 70 locks.add(lock); in addLock() 77 synchronized void removeLock(FileLock lock) { in removeLock() argument 78 locks.remove(lock); in removeLock()
|
D | IOUtil.java | 64 CharBuffer chars, CharsetDecoder decoder, Object lock) in readInputStreamReader() argument 66 synchronized (lock) { in readInputStreamReader() 86 CharsetDecoder decoder, Object lock) throws IOException { in readInputStreamReader() argument 87 synchronized (lock) { in readInputStreamReader() 159 CharsetEncoder encoder, Object lock) throws IOException { 162 convert(lock, encoder, bytes, chars, out); 169 ByteBuffer bytes, CharsetEncoder encoder, Object lock) 171 synchronized (lock) { 177 convert(lock, encoder, bytes, chars, out); 186 CharsetEncoder encoder, Object lock) throws IOException { [all …]
|
/dalvik/libcore/support/src/test/java/tests/support/ |
D | Support_StringWriter.java | 34 lock = buf; in Support_StringWriter() 45 lock = buf; in Support_StringWriter() 79 synchronized (lock) { in getBuffer() 93 synchronized (lock) { in toString() 117 synchronized (lock) { in write() 136 synchronized (lock) { in write() 151 synchronized (lock) { in write() 174 synchronized (lock) { in write()
|
D | Support_StringReader.java | 54 synchronized (lock) { in close() 82 synchronized (lock) { in mark() 119 synchronized (lock) { in read() 152 synchronized (lock) { in read() 187 synchronized (lock) { in ready() 206 synchronized (lock) { in reset() 229 synchronized (lock) { in skip()
|
/dalvik/vm/ |
D | Sync.c | 148 pthread_mutex_t lock; member 191 dvmInitMutex(&mon->lock); in dvmCreateMonitor() 285 Lock lock = obj->lock; in dvmHoldsLock() local 286 if (IS_LOCK_FAT(&lock)) { in dvmHoldsLock() 287 return thread == lock.mon->owner; in dvmHoldsLock() 289 return thread->threadId == (lock.thin & 0xffff); in dvmHoldsLock() 297 void dvmFreeObjectMonitor_internal(Lock *lock) in dvmFreeObjectMonitor_internal() argument 303 assert(IS_LOCK_FAT(lock)); in dvmFreeObjectMonitor_internal() 307 removeCollectedObject(lock->mon->obj); in dvmFreeObjectMonitor_internal() 310 mon = lock->mon; in dvmFreeObjectMonitor_internal() [all …]
|
D | Sync.h | 51 #define DVM_LOCK_INIT(lock) \ argument 52 do { (lock)->thin = DVM_LOCK_INITIAL_THIN_VALUE; } while (0) 57 #define IS_LOCK_FAT(lock) (((lock)->thin & 1) == 0 && (lock)->mon != NULL) argument 93 void dvmFreeObjectMonitor_internal(Lock* lock); 97 if (IS_LOCK_FAT(&DFM_obj_->lock)) { \ 98 dvmFreeObjectMonitor_internal(&DFM_obj_->lock); \
|