Searched refs:lock (Results 1 - 25 of 76) sorted by relevance

1234

/dalvik/libcore/concurrent/src/test/java/tests/api/java/util/concurrent/
H A DReentrantReadWriteLockTest.java29 final ReentrantReadWriteLock lock; field in class:ReentrantReadWriteLockTest.InterruptibleLockRunnable
30 InterruptibleLockRunnable(ReentrantReadWriteLock l) { lock = l; }
33 lock.writeLock().lockInterruptibly();
44 final ReentrantReadWriteLock lock; field in class:ReentrantReadWriteLockTest.InterruptedLockRunnable
45 InterruptedLockRunnable(ReentrantReadWriteLock l) { lock = l; }
48 lock.writeLock().lockInterruptibly();
82 * write-locking and read-locking an unlocked lock succeed
86 rl.writeLock().lock();
94 rl.readLock().lock();
106 * locking an unlocked fair lock succeed
968 private Lock lock; field in class:ReentrantReadWriteLockTest.UninterruptableThread
975 UninterruptableThread(Lock lock, Condition c) argument
[all...]
H A DReentrantLockTest.java29 final ReentrantLock lock; field in class:ReentrantLockTest.InterruptibleLockRunnable
30 InterruptibleLockRunnable(ReentrantLock l) { lock = l; }
33 lock.lockInterruptibly();
44 final ReentrantLock lock; field in class:ReentrantLockTest.InterruptedLockRunnable
45 InterruptedLockRunnable(ReentrantLock l) { lock = l; }
48 lock.lockInterruptibly();
80 * locking an unlocked lock succeeds
84 rl.lock();
90 * locking an unlocked fair lock succeeds
94 rl.lock();
872 private ReentrantLock lock; field in class:ReentrantLockTest.UninterruptableThread
879 UninterruptableThread(ReentrantLock lock, Condition c) argument
[all...]
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/
H A DPriorityBlockingQueue.java73 private final ReentrantLock lock = new ReentrantLock(true); field in class:PriorityBlockingQueue
74 private final Condition notEmpty = lock.newCondition();
161 final ReentrantLock lock = this.lock;
162 lock.lock();
169 lock.unlock();
205 final ReentrantLock lock = this.lock;
206 lock
[all...]
H A DDelayQueue.java42 private transient final ReentrantLock lock = new ReentrantLock(); field in class:DelayQueue
68 private final Condition available = lock.newCondition();
106 final ReentrantLock lock = this.lock;
107 lock.lock();
116 lock.unlock();
153 final ReentrantLock lock = this.lock;
154 lock
[all...]
H A DArrayBlockingQueue.java71 /** 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;
[all...]
H A DCyclicBarrier.java108 * using the barrier - due to the non-deterministic way the lock
119 /** The lock for guarding barrier entry */
120 private final ReentrantLock lock = new ReentrantLock(); field in class:CyclicBarrier
122 private final Condition trip = lock.newCondition();
139 * Called only while holding lock.
151 * Called only while holding lock.
165 final ReentrantLock lock = this.lock;
166 lock.lock();
[all...]
H A DScheduledThreadPoolExecutor.java693 private final ReentrantLock lock = new ReentrantLock(); field in class:ScheduledThreadPoolExecutor.DelayedWorkQueue
718 private final Condition available = lock.newCondition();
730 * Call only when holding lock.
748 * Call only when holding lock.
769 * Resize the heap array. Call only when holding lock.
800 final ReentrantLock lock = this.lock;
801 lock.lock();
805 lock
[all...]
H A DCopyOnWriteArrayList.java53 private final transient ReentrantLock lock = new ReentrantLock(); field in class:CopyOnWriteArrayList
89 lock.lock();
100 lock.unlock();
105 lock.lock();
119 lock.unlock();
126 lock.lock();
139 lock
[all...]
/dalvik/libcore/luni/src/main/java/java/util/
H A DTimerTask.java29 final Object lock = new Object(); field in class:TimerTask
51 synchronized (lock) {
60 synchronized (lock) {
72 synchronized (lock) {
93 synchronized (lock) {
108 synchronized (lock) {
/dalvik/libcore/luni/src/main/java/java/io/
H A DFilterReader.java56 synchronized (lock) {
79 synchronized (lock) {
96 synchronized (lock) {
113 synchronized (lock) {
138 synchronized (lock) {
156 synchronized (lock) {
176 synchronized (lock) {
198 synchronized (lock) {
H A DLineNumberReader.java68 synchronized (lock) {
91 synchronized (lock) {
116 synchronized (lock) {
158 synchronized (lock) {
194 synchronized (lock) {
221 synchronized (lock) {
239 synchronized (lock) {
267 synchronized (lock) {
H A DReader.java43 protected Object lock; field in class:Reader
51 lock = this;
55 * Constructs a new {@code Reader} with {@code lock} used to synchronize
58 * @param lock
61 * if {@code lock} is {@code null}.
63 protected Reader(Object lock) { argument
64 if (lock == null) {
67 this.lock = lock;
124 synchronized (lock) {
[all...]
H A DWriter.java44 protected Object lock; field in class:Writer
52 lock = this;
56 * Constructs a new {@code Writer} with {@code lock} used to synchronize
59 * @param lock
62 * if {@code lock} is {@code null}.
64 protected Writer(Object lock) { argument
65 if (lock == null) {
68 this.lock = lock;
136 synchronized (lock) {
[all...]
H A DFilterWriter.java57 synchronized (lock) {
71 synchronized (lock) {
94 synchronized (lock) {
110 synchronized (lock) {
131 synchronized (lock) {
H A DCharArrayWriter.java45 * {@code lock} to synchronize access to this writer.
50 lock = buf;
56 * as the {@code lock} to synchronize access to this writer.
69 lock = buf;
106 synchronized (lock) {
119 synchronized (lock) {
132 synchronized (lock) {
148 synchronized (lock) {
184 synchronized (lock) {
201 synchronized (lock) {
[all...]
H A DStringReader.java90 synchronized (lock) {
121 synchronized (lock) {
158 synchronized (lock) {
197 synchronized (lock) {
218 synchronized (lock) {
248 synchronized (lock) {
H A DCharArrayReader.java102 synchronized (lock) {
140 synchronized (lock) {
173 synchronized (lock) {
221 synchronized (lock) {
249 synchronized (lock) {
268 synchronized (lock) {
289 synchronized (lock) {
/dalvik/libcore/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/
H A DMockPreferenceChangeListener.java7 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
[all...]
/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/internal/
H A DLockManager.java27 * 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) argument
58 long lockEnd = lock.position() + lock.size();
66 if (existingLock.overlaps(lock
77 removeLock(FileLock lock) argument
[all...]
H A DIOUtil.java50 CharBuffer chars, CharsetDecoder decoder, Object lock)
52 synchronized (lock) {
72 CharsetDecoder decoder, Object lock) throws IOException {
73 synchronized (lock) {
145 CharsetEncoder encoder, Object lock) throws IOException {
148 convert(lock, encoder, bytes, chars, out);
155 ByteBuffer bytes, CharsetEncoder encoder, Object lock)
157 synchronized (lock) {
163 convert(lock, encoder, bytes, chars, out);
172 CharsetEncoder encoder, Object lock) throw
49 readInputStreamReader(InputStream in, ByteBuffer bytes, CharBuffer chars, CharsetDecoder decoder, Object lock) argument
70 readInputStreamReader(char[] buf, int offset, int length, InputStream in, ByteBuffer bytes, CharBuffer chars, CharsetDecoder decoder, Object lock) argument
143 writeOutputStreamWriter(String str, int offset, int count, OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
154 writeOutputStreamWriter(int oneChar, OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
170 writeOutputStreamWriter(char[] buf, int offset, int count, OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
181 flushOutputStreamWriter(OutputStream out, ByteBuffer bytes, CharsetEncoder encoder, Object lock) argument
202 convert(Object lock, CharsetEncoder encoder, ByteBuffer bytes, CharBuffer chars, OutputStream out) argument
[all...]
/dalvik/libcore/support/src/test/java/tests/support/
H A DSupport_StringWriter.java29 * <code>lock</code> used to synchronize access to this Writer.
34 lock = buf;
40 * the <code>lock</code> used to synchronize access to this Writer.
45 lock = buf;
79 synchronized (lock) {
93 synchronized (lock) {
117 synchronized (lock) {
136 synchronized (lock) {
151 synchronized (lock) {
174 synchronized (lock) {
[all...]
H A DSupport_StringReader.java54 synchronized (lock) {
82 synchronized (lock) {
119 synchronized (lock) {
152 synchronized (lock) {
187 synchronized (lock) {
206 synchronized (lock) {
229 synchronized (lock) {
/dalvik/libcore/concurrent/src/main/java/java/util/concurrent/locks/
H A DLock.java17 * <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
41 * allowing a lock to be acquired and released in different scopes,
52 * l.lock();
154 void lock(); method in interface:Lock
[all...]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/io/
H A DWriterTest.java67 MockWriter(Object lock) { argument
68 super(lock);
69 myLock = lock;
88 return (lock == o);
/dalvik/vm/
H A DSync.c29 * - reverting to a thin lock once the Monitor is no longer necessary
82 * The two states of an Object's lock are referred to as "thin" and
83 * "fat". A lock may transition from the "thin" state to the "fat"
84 * state and this transition is referred to as inflation. Once a lock
87 * The lock value itself is stored in Object.lock. The LSB of the
88 * lock encodes its state. When cleared, the lock is in the "thin"
92 * lock count thread id hash state 0
94 * When set, the lock i
122 pthread_mutex_t lock; member in struct:Monitor
245 u4 lock; local
1359 u4 lock, owner, hashState; local
1708 u4 lock = parent->lock; local
1856 u4 lock = child->lock; local
[all...]

Completed in 346 milliseconds

1234