/dalvik/libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ |
H A D | LockSupportTest.java | 100 final ReentrantLock lock = new ReentrantLock(); 101 lock.lock(); 105 lock.lock(); 115 lock.unlock();
|
H A D | SemaphoreTest.java | 41 final Semaphore lock; field in class:SemaphoreTest.InterruptibleLockRunnable 42 InterruptibleLockRunnable(Semaphore l) { lock = l; } 45 lock.acquire(); 56 final Semaphore lock; field in class:SemaphoreTest.InterruptedLockRunnable 57 InterruptedLockRunnable(Semaphore l) { lock = l; } 60 lock.acquire(); 316 final Semaphore lock = new Semaphore(1, false); 317 Thread t1 = new Thread(new InterruptedLockRunnable(lock)); 318 Thread t2 = new Thread(new InterruptibleLockRunnable(lock)); 320 assertFalse(lock [all...] |
/dalvik/vm/ |
H A D | Sync.h | 44 * lock. Performs no error checking. 52 * holding the lock. 60 * a lock has been recursively acquired. 79 #define DVM_LOCK_INIT(lock) \ 80 do { *(lock) = DVM_LOCK_INITIAL_THIN_VALUE; } while (0) 83 * Returns true if the lock has been fattened. 85 #define IS_LOCK_FAT(lock) (LW_SHAPE(*(lock)) == LW_SHAPE_FAT) 144 * Get the thread that holds the lock on the specified object. The 147 * The caller must lock th [all...] |
H A D | Hash.h | 79 pthread_mutex_t lock; member in struct:HashTable 115 dvmLockMutex(&pHashTable->lock); 118 dvmUnlockMutex(&pHashTable->lock); 143 * forget to lock the table before calling this. 215 * The caller should lock the table beforehand.
|
H A D | LinearAlloc.h | 35 pthread_mutex_t lock; /* controls updates to this struct */ member in struct:LinearAllocHdr
|
H A D | LinearAlloc.c | 212 dvmInitMutex(&pHdr->lock); 287 dvmLockMutex(&pHdr->lock); 388 dvmUnlockMutex(&pHdr->lock); 456 dvmLockMutex(&pHdr->lock); 527 dvmUnlockMutex(&pHdr->lock); 592 * We grab the lock so that the header contents and list output are 602 dvmLockMutex(&pHdr->lock); 653 dvmUnlockMutex(&pHdr->lock); 669 dvmLockMutex(&pHdr->lock); 687 dvmUnlockMutex(&pHdr->lock); [all...] |
/dalvik/libcore/luni/src/main/java/java/io/ |
H A D | PushbackReader.java | 85 synchronized (lock) { 137 synchronized (lock) { 180 synchronized (lock) { 241 synchronized (lock) { 315 synchronized (lock) { 355 synchronized (lock) { 383 synchronized (lock) {
|
H A D | BufferedReader.java | 135 synchronized (lock) { 220 synchronized (lock) { 256 synchronized (lock) { 296 synchronized (lock) { 381 synchronized (lock) { 474 synchronized (lock) { 494 synchronized (lock) { 527 synchronized (lock) {
|
H A D | BufferedWriter.java | 116 synchronized (lock) { 153 synchronized (lock) { 214 synchronized (lock) { 272 synchronized (lock) { 306 synchronized (lock) {
|
H A D | OutputStreamWriter.java | 148 synchronized (lock) { 170 synchronized (lock) { 225 synchronized (lock) { 273 synchronized (lock) { 302 synchronized (lock) {
|
H A D | StringWriter.java | 39 * StringBuffer} is also the {@code lock} used to synchronize access to this 45 lock = buf; 51 * StringBuffer} is also the {@code lock} used to synchronize access to this 62 lock = buf;
|
H A D | PrintWriter.java | 257 synchronized (lock) { 276 synchronized (lock) { 505 synchronized (lock) { 618 synchronized (lock) { 641 synchronized (lock) { 704 synchronized (lock) {
|
/dalvik/libcore/nio/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/ |
H A D | FileLockTest.java | 121 FileLock lock = new MockFileLock(null, 0, 10, true); 122 assertNull(lock.channel()); 175 FileLock lock = new MockFileLock(null, 0, 10, true); 176 assertTrue(lock.isShared()); 209 FileLock fileLock = readWriteChannel.lock(); 229 FileLock fileLock = fileChannel.lock(); 241 fileLock = fileChannel.lock(); 266 FileLock fileLock = fileChannel.lock(); 279 FileLock lock = raf.getChannel().tryLock(); 280 raf.write("file lock tes [all...] |
/dalvik/dx/src/com/android/dx/util/ |
H A D | IndentingWriter.java | 92 synchronized (lock) { 140 synchronized (lock) { 152 synchronized (lock) {
|
/dalvik/libcore/nio/src/main/java/java/nio/channels/ |
H A D | FileChannel.java | 55 * <li>lock ranges of bytes associated with the file,</li> 161 * Obtains an exclusive lock on this file. 163 * This is a convenience method for acquiring a maximum length lock on a 165 * {@code fileChannel.lock(0L, Long.MAX_VALUE, false);} 167 * @return the lock object representing the locked file area. 173 * either a lock is already held that overlaps this lock 174 * request, or another thread is waiting to acquire a lock that 178 * the lock. 181 * to acquire the lock 186 public final FileLock lock() throws IOException { method in class:FileChannel 252 public abstract FileLock lock(long position, long size, boolean shared) method in class:FileChannel [all...] |
H A D | Channels.java | 434 synchronized (lock) { 445 synchronized (lock) { 461 decoder, lock); 467 inputStream, bytes, chars, decoder, lock); 496 synchronized (lock) { 511 lock); 517 byteBuf, encoder, lock); 523 encoder, lock); 529 byteBuf, encoder, lock);
|
/dalvik/libcore/sql/src/main/java/SQLite/JDBC2y/ |
H A D | JDBCConnection.java | 404 static Object lock = new Object(); field in class:DatabaseX 412 synchronized (lock) { 413 lock.wait(ms); 422 synchronized (lock) { 423 lock.notifyAll(); 430 synchronized (lock) { 431 lock.notifyAll(); 438 synchronized (lock) { 439 lock.notifyAll(); 447 synchronized (lock) { [all...] |
/dalvik/libcore/luni/src/main/native/ |
H A D | org_apache_harmony_luni_platform_OSFileSystem.cpp | 136 // FileChannel.tryLock uses Long.MAX_VALUE to mean "lock the whole 144 struct flock lock; local 145 memset(&lock, 0, sizeof(lock)); 147 lock.l_whence = SEEK_SET; 148 lock.l_start = start; 149 lock.l_len = length; 151 return lock; 162 struct flock lock(flockFromStartAndLength(start, length)); 165 lock [all...] |
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/locks/ |
H A D | ReentrantLock.java | 14 * behavior and semantics as the implicit monitor lock accessed using 20 * {@code lock} will return, successfully acquiring the lock, when 21 * the lock is not owned by another thread. The method will return 22 * immediately if the current thread already owns the lock. This can 29 * thread. Otherwise this lock does not guarantee any particular 36 * fair lock may obtain it multiple times in succession while other 38 * lock. 40 * honor the fairness setting. It will succeed if the lock 44 * follow a call to {@code lock} wit 97 abstract void lock(); method in class:ReentrantLock.Sync 181 final void lock() { method in class:ReentrantLock.NonfairSync 199 final void lock() { method in class:ReentrantLock.FairSync 260 public void lock() { method in class:ReentrantLock [all...] |
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/ |
H A D | LinkedBlockingQueue.java | 49 * A variant of the "two lock queue" algorithm. The putLock gates 98 * otherwise ordinarily lock takeLock.) 102 takeLock.lock(); 115 putLock.lock(); 149 putLock.lock(); 150 takeLock.lock(); 246 * not protected by lock. This works because count can 248 * out by lock), and we (or some other waiting put) are 333 putLock.lock(); 417 takeLock.lock(); [all...] |
H A D | ThreadPoolExecutor.java | 249 * pauseLock.lock(); 260 * pauseLock.lock(); 269 * pauseLock.lock(); 412 * to be generally preferable to use a lock. Among the reasons is 525 * to simplify acquiring and releasing a lock surrounding each 529 * non-reentrant mutual exclusion lock rather than use ReentrantLock 531 * lock when they invoke pool control methods like setCorePoolSize. 587 public void lock() { acquire(1); } method in class:ThreadPoolExecutor.Worker 636 mainLock.lock(); 671 mainLock.lock(); [all...] |
/dalvik/libcore/prefs/src/main/java/java/util/prefs/ |
H A D | AbstractPreferences.java | 96 /** Marker class for 'lock' field. */ 100 * The object used to lock this node. 102 protected final Object lock; field in class:AbstractPreferences 161 lock = new Lock(); 196 synchronized (lock) { 219 synchronized (lock) { 357 synchronized (lock) { 370 synchronized (lock) { 403 synchronized (lock) { 419 synchronized (lock) { [all...] |
H A D | XMLParser.java | 418 synchronized (((AbstractPreferences) prefs).lock) { 496 * lock or not? 515 FileLock lock = null; 522 lock = channel.lock(0L, Long.MAX_VALUE, true); 544 releaseQuietly(lock); 570 FileLock lock = null; 577 lock = channel.lock(); 595 releaseQuietly(lock); 600 releaseQuietly(FileLock lock) argument [all...] |
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ |
H A D | ThreadTest.java | 139 assertTrue("Thread should hold lock for object", b); 144 assertFalse("Thread should not hold lock for object", b); 677 final Object lock = new Object(); 681 synchronized (lock) { 682 lock.notifyAll(); 686 synchronized (lock) { 689 lock.wait(); 711 final Object lock = new Object(); 720 synchronized (lock) { 721 lock [all...] |
/dalvik/libcore/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/ |
H A D | MockAbstractPreferences.java | 83 public Object lock() { method in class:MockAbstractPreferences 84 return lock; 196 return lock;
|