/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/internal/ |
LockManager.java | 27 * The lock manager is responsible for tracking acquired and pending locks on 52 * Add a new pending lock to the manager. Throws an exception if the lock 53 * would overlap an existing lock. Once the lock is acquired it remains in 54 * this set as an acquired lock. 56 synchronized void addLock(FileLock lock) 58 long lockEnd = lock.position() + lock.size(); 66 if (existingLock.overlaps(lock.position(), lock.size())) [all...] |
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/locks/ |
ReadWriteLock.java | 11 * Lock locks}, one for read-only operations and one for writing. 12 * The {@link #readLock read lock} may be held simultaneously by 14 * {@link #writeLock write lock} is exclusive. 18 * (as specified in the {@link Lock} interface) also hold with respect 20 * acquiring the read lock will see all updates made upon previous 21 * release of the write lock. 23 * <p>A read-write lock allows for a greater level of concurrency in 24 * accessing shared data than that permitted by a mutual exclusion lock. 30 * lock will lead to performance improvements over the use of a mutual 31 * exclusion lock. In practice this increase in concurrency will only be full [all...] |
Lock.java | 11 * {@code Lock} implementations provide more extensive locking 17 * <p>A lock is a tool for controlling access to a shared resource by 18 * multiple threads. Commonly, a lock provides exclusive access to a 19 * shared resource: only one thread at a time can acquire the lock and 20 * all access to the shared resource requires that the lock be 22 * a shared resource, such as the read lock of a {@link ReadWriteLock}. 25 * access to the implicit monitor lock associated with every object, but 26 * forces all lock acquisition and release to occur in a block-structured way: 38 * acquire the lock of node A, then node B, then release A and acquire 40 * {@code Lock} interface enable the use of such techniques b 154 void lock(); method in interface:Lock [all...] |
ReentrantLock.java | 13 * A reentrant mutual exclusion {@link Lock} with the same basic 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 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...] |
ReentrantReadWriteLock.java | 21 * ordering for lock access. However, it does support an optional 27 * to the read and write lock is unspecified, subject to reentrancy 28 * constraints. A nonfair lock that is continuously contended may 30 * will normally have higher throughput than a fair lock. 35 * approximately arrival-order policy. When the currently held lock 37 * be assigned the write lock, or if there is a group of reader threads 39 * assigned the read lock. 41 * <p>A thread that tries to acquire a fair read lock (non-reentrantly) 42 * will block if either the write lock is held, or there is a waiting 43 * writer thread. The thread will not acquire the read lock unti 700 public void lock() { method in class:ReentrantReadWriteLock.ReadLock 913 public void lock() { method in class:ReentrantReadWriteLock.WriteLock [all...] |
/system/extras/tests/bionic/libc/bionic/ |
test_mutex.c | 58 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; local 78 expect( pthread_mutex_init( &lock, &attr ), 0 ); 79 expect( pthread_mutex_lock( &lock ), 0 ); 80 expect( pthread_mutex_unlock( &lock ), 0 ); 81 expect( pthread_mutex_destroy( &lock ), 0 ); 85 expect( pthread_mutex_init( &lock, &attr ), 0 ); 86 expect( pthread_mutex_lock( &lock ), 0 ); 87 expect( pthread_mutex_lock( &lock ), EDEADLK ); 88 expect( pthread_mutex_unlock( &lock ), 0 ); 89 expect( pthread_mutex_trylock( &lock ), 0 ) [all...] |
/external/clearsilver/util/ |
ulocks.c | 29 int lock; local 35 * someone else can grab your lock and DoS you. For internal use, who 38 if((lock = open(file, O_WRONLY|O_NDELAY|O_APPEND|O_CREAT|O_EXCL, 0666)) < 0) 49 lock = open(file, O_WRONLY|O_NDELAY|O_APPEND|O_CREAT, 0666); 55 if (lock < 0) 56 return nerr_raise_errno (NERR_IO, "Unable to open lock file %s", file); 59 *plock = lock; 64 void fDestroy(int lock) 67 if(lock < 0) 70 close(lock); 77 int lock; local [all...] |
ulocks.h | 23 * Function: fCreate - create a file lock. 24 * Description: Creates a file lock on named file <file>. The lock is 26 * Input: plock - place for lock. 27 * file - path of file to use as lock. 28 * Output: plock - set to lock identifier. 36 * Function: fFind - find a file lock. 38 * lock identifier for it in <plock>. If the file doesn't 40 * Input: plock - place for lock. 41 * file - path of file to use as lock [all...] |
/external/kernel-headers/original/linux/ |
seqlock.h | 5 * lock for data where the reader wants a consitent set of information 34 spinlock_t lock; member in struct:__anon3156 53 /* Lock out other writers and update the count. 59 spin_lock(&sl->lock); 68 spin_unlock(&sl->lock); 73 int ret = spin_trylock(&sl->lock); 158 #define write_seqlock_irqsave(lock, flags) \ 159 do { local_irq_save(flags); write_seqlock(lock); } while (0) 160 #define write_seqlock_irq(lock) \ 161 do { local_irq_disable(); write_seqlock(lock); } while (0 [all...] |
/external/ppp/pppd/ |
spinlock.c | 48 static inline int __spin_trylock(spinlock_t *lock) 54 : "r" (lock) 60 static inline void __spin_unlock(spinlock_t *lock) 63 *lock = 0; 66 static inline void __spin_lock_init(spinlock_t *lock) 68 *lock = 0; 71 static inline int __spin_is_locked(spinlock_t *lock) 73 return (*lock != 0); 78 static inline int __spin_trylock(spinlock_t *lock) 92 : "r"(lock) [all...] |
/external/clearsilver/man/man3/ |
mLock.3 | 14 mLock - lock a mutex. 25 mutex - mutex to lock.
|
dictSearch.3 | 29 plock - place for value lock (or NULL). 34 the lock returned in <plock> will be associated with 35 the returned value. Until this lock is passed to 42 plock - set to value lock.
|
skipNext.3 | 29 plock - place for value lock (or NULL). 35 the lock returned in <plock> will be associated with 36 the returned value. Until this lock is passed to 45 plock - set to value lock.
|
skipSearch.3 | 29 plock - place for value lock (or NULL). 34 the lock returned in <plock> will be associated with 35 the returned value. Until this lock is passed to 42 plock - set to value lock.
|
/dalvik/libcore/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/ |
MockPreferenceChangeListener.java | 7 private Object lock = new Object(); field in class:MockPreferenceChangeListener 40 synchronized (lock) { 41 lock.wait(500); 48 // private Object lock = new Object(); 51 synchronized (lock) { 78 lock.notifyAll(); 83 synchronized (lock) { 88 lock.wait(100); 99 synchronized (lock) { 104 lock.wait(1000) [all...] |
/system/extras/tests/bionic/libc/common/ |
test_pthread_mutex.c | 37 * is detected with a PTHREAD_MUTEX_ERRORCHECK lock() or trylock(), but 110 /* perform a simple init/lock/unlock/destroy test on a mutex of given attributes */ 114 pthread_mutex_t lock[1]; local 116 TZERO(pthread_mutex_init(lock, attr)); 117 TZERO(pthread_mutex_lock(lock)); 118 TZERO(pthread_mutex_unlock(lock)); 119 TZERO(pthread_mutex_destroy(lock)); 131 /* simple init/lock/unlock/destroy on all mutex types */ 170 /* perform init/trylock/unlock/destroy then init/lock/trylock/destroy */ 173 pthread_mutex_t lock[1] local 189 pthread_mutex_t lock[1]; local 206 pthread_mutex_t lock[1]; local [all...] |
/bionic/libc/stdio/ |
flockfile.c | 61 * lock a really large number of FILE* objects on an embedded 67 pthread_mutex_t lock; member in struct:__anon504 79 pthread_mutex_init(&_lockTable->lock, NULL); 88 pthread_mutex_lock( &_lockTable->lock ); 95 pthread_mutex_unlock( &t->lock ); 122 FileLock* lock = *lookup; local 124 if (lock == NULL) { 128 lock = malloc(sizeof(*lock)); 129 if (lock == NULL) 162 FileLock* lock = *lookup; local 183 FileLock* lock = *lookup; local 201 FileLock* lock = *lookup; local [all...] |
/dalvik/libcore/nio/src/main/java/java/nio/channels/ |
FileLock.java | 26 * the lost update problem or reading inconsistent data. Logically, a file lock 29 * an exclusive lock on a given region of a file and no other process can 30 * simultaneously hold a shared lock overlapping the exclusive lock. An 35 * can determine whether a proposed lock will overlap by using the {@code 41 * Once a lock is acquired, it is immutable in all its state except {@code 42 * isValid()}. The lock will initially be valid, but may be rendered invalid by 43 * explicit removal of the lock, using {@code release()}, or implicitly by 61 * On some platforms, the presence of a lock will prevent the file from being 76 // The lock starting position [all...] |
/external/kernel-headers/original/asm-x86/ |
spinlock_32.h | 22 * Simple spin lock operations. There are two variants, one clears IRQ's 35 static inline void __raw_spin_lock(raw_spinlock_t *lock) 46 : "+m" (lock->slock) : : "memory"); 50 * It is easier for the lock validator if interrupts are not re-enabled 51 * in the middle of a lock-acquire. This is a performance feature anyway 58 static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) 80 : [slock] "+m" (lock->slock) 87 static inline int __raw_spin_trylock(raw_spinlock_t *lock) 92 :"=q" (oldval), "+m" (lock->slock) 106 static inline void __raw_spin_unlock(raw_spinlock_t *lock) [all...] |
/bionic/libc/kernel/arch-x86/asm/ |
spinlock_32.h | 26 #define _raw_spin_relax(lock) cpu_relax() 27 #define _raw_read_relax(lock) cpu_relax() 28 #define _raw_write_relax(lock) cpu_relax()
|
/external/kernel-headers/original/asm-arm/ |
spinlock.h | 12 * won the lock, so we try exclusively storing it. A memory barrier 13 * is required after we get a lock, and before we release it, because 20 #define __raw_spin_is_locked(x) ((x)->lock != 0) 21 #define __raw_spin_unlock_wait(lock) \ 22 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) 24 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 26 static inline void __raw_spin_lock(raw_spinlock_t *lock) 40 : "r" (&lock->lock), "r" (1 [all...] |
/external/oprofile/libutil/ |
op_lockfile.h | 22 * op_write_lock_file - write a lock file 25 * Write the pid into the given lock file. Stale 26 * lock files are detected and reset.
|
/ndk/build/platforms/android-5/arch-x86/usr/include/asm/ |
spinlock_32.h | 26 #define _raw_spin_relax(lock) cpu_relax() 27 #define _raw_read_relax(lock) cpu_relax() 28 #define _raw_write_relax(lock) cpu_relax()
|
/ndk/build/platforms/android-8/arch-x86/usr/include/asm/ |
spinlock_32.h | 26 #define _raw_spin_relax(lock) cpu_relax() 27 #define _raw_read_relax(lock) cpu_relax() 28 #define _raw_write_relax(lock) cpu_relax()
|
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/ |
ArrayBlockingQueue.java | 71 /** Main lock guarding all access */ 72 private final ReentrantLock lock; field in class:ArrayBlockingQueue 89 * Call only when holding lock. 100 * Call only when holding lock. 114 * Call only when holding lock. 165 lock = new ReentrantLock(fair); 166 notEmpty = lock.newCondition(); 167 notFull = lock.newCondition(); 222 final ReentrantLock lock = this.lock; local 246 final ReentrantLock lock = this.lock; local 275 final ReentrantLock lock = this.lock; local 298 final ReentrantLock lock = this.lock; local 311 final ReentrantLock lock = this.lock; local 330 final ReentrantLock lock = this.lock; local 354 final ReentrantLock lock = this.lock; local 371 final ReentrantLock lock = this.lock; local 394 final ReentrantLock lock = this.lock; local 417 final ReentrantLock lock = this.lock; local 448 final ReentrantLock lock = this.lock; local 479 final ReentrantLock lock = this.lock; local 533 final ReentrantLock lock = this.lock; local 557 final ReentrantLock lock = this.lock; local 572 final ReentrantLock lock = this.lock; local 602 final ReentrantLock lock = this.lock; local 640 final ReentrantLock lock = this.lock; local 676 final ReentrantLock lock = this.lock; local 744 final ReentrantLock lock = ArrayBlockingQueue.this.lock; local 760 final ReentrantLock lock = ArrayBlockingQueue.this.lock; local [all...] |