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

1234567891011>>

/openjdk10/hotspot/test/serviceability/tmtools/jstack/utils/
H A DLockInfo.java27 * Represents lock info string
32 private String lock; field in class:LockInfo
35 return lock;
38 public void setLock(String lock) { argument
39 this.lock = lock;
/openjdk10/jdk/test/java/util/concurrent/tck/
H A DReentrantReadWriteLockTest.java64 final ReentrantReadWriteLock lock; field in class:ReentrantReadWriteLockTest.InterruptibleLockRunnable
65 InterruptibleLockRunnable(ReentrantReadWriteLock l) { lock = l; }
67 lock.writeLock().lockInterruptibly();
76 final ReentrantReadWriteLock lock; field in class:ReentrantReadWriteLockTest.InterruptedLockRunnable
77 InterruptedLockRunnable(ReentrantReadWriteLock l) { lock = l; }
79 lock.writeLock().lockInterruptibly();
101 * Releases write lock, checking that it had a hold count of 1.
103 void releaseWriteLock(PublicReentrantReadWriteLock lock) { argument
104 ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
105 assertWriteLockedByMoi(lock);
114 waitForQueuedThread(PublicReentrantReadWriteLock lock, Thread t) argument
128 assertNotWriteLocked(PublicReentrantReadWriteLock lock) argument
140 assertWriteLockedBy(PublicReentrantReadWriteLock lock, Thread t) argument
157 assertWriteLockedByMoi(PublicReentrantReadWriteLock lock) argument
164 assertHasNoWaiters(PublicReentrantReadWriteLock lock, Condition c) argument
171 assertHasWaiters(PublicReentrantReadWriteLock lock, Condition c, Thread... threads) argument
[all...]
H A DReentrantLockTest.java63 final ReentrantLock lock; field in class:ReentrantLockTest.InterruptibleLockRunnable
64 InterruptibleLockRunnable(ReentrantLock lock) { this.lock = lock; } argument
66 lock.lockInterruptibly();
75 final ReentrantLock lock; field in class:ReentrantLockTest.InterruptedLockRunnable
76 InterruptedLockRunnable(ReentrantLock lock) { this.lock = lock; } argument
78 lock
102 releaseLock(PublicReentrantLock lock) argument
112 waitForQueuedThread(PublicReentrantLock lock, Thread t) argument
126 assertNotLocked(PublicReentrantLock lock) argument
136 assertLockedBy(PublicReentrantLock lock, Thread t) argument
148 assertLockedByMoi(PublicReentrantLock lock) argument
155 assertHasNoWaiters(PublicReentrantLock lock, Condition c) argument
162 assertHasWaiters(PublicReentrantLock lock, Condition c, Thread... threads) argument
[all...]
H A DStampedLockTest.java60 * Releases write lock, checking isWriteLocked before and after
62 void releaseWriteLock(StampedLock lock, long stamp) { argument
63 assertTrue(lock.isWriteLocked());
64 assertValid(lock, stamp);
65 lock.unlockWrite(stamp);
66 assertFalse(lock.isWriteLocked());
67 assertFalse(lock.validate(stamp));
71 * Releases read lock, checking isReadLocked before and after
73 void releaseReadLock(StampedLock lock, long stamp) { argument
74 assertTrue(lock
86 assertValid(StampedLock lock, long stamp) argument
92 assertUnlocked(StampedLock lock) argument
99 lockLockers(Lock lock) argument
[all...]
/openjdk10/hotspot/src/share/vm/gc/cms/
H A DcmsLockVerifier.hpp33 // main GC thread or the CMS thread might hold the lock on behalf of
37 static void assert_locked(const Mutex* lock, const Mutex* p_lock1, const Mutex* p_lock2)
39 static void assert_locked(const Mutex* lock, const Mutex* p_lock) { argument
40 assert_locked(lock, p_lock, NULL);
42 static void assert_locked(const Mutex* lock) { argument
43 assert_locked(lock, NULL);
H A DcmsLockVerifier.cpp33 // or the CMS thread might hold the lock on behalf of the parallel
37 void CMSLockVerifier::assert_locked(const Mutex* lock, argument
46 if (lock == NULL) { // a "lock-free" structure, e.g. MUT, protected by CMS token
70 // Make sure that we are holding the associated lock.
71 assert_lock_strong(lock);
83 // Make sure that the VM or CMS thread holds lock on our behalf
87 assert(lock->owner() == VMThread::vm_thread() ||
88 lock->owner() == ConcurrentMarkSweepThread::cmst(),
/openjdk10/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/
H A DToolkitThreadBlockedHandler.java29 public void lock(); method in interface:ToolkitThreadBlockedHandler
/openjdk10/jdk/src/java.base/share/classes/java/util/concurrent/
H A DDelayQueue.java80 private final transient ReentrantLock lock = new ReentrantLock(); field in class:DelayQueue
106 private final Condition available = lock.newCondition();
144 final ReentrantLock lock = this.lock;
145 lock.lock();
154 lock.unlock();
191 final ReentrantLock lock = this.lock;
192 lock
[all...]
H A DCyclicBarrier.java144 * using the barrier - due to the non-deterministic way the lock
156 /** The lock for guarding barrier entry */
157 private final ReentrantLock lock = new ReentrantLock(); field in class:CyclicBarrier
159 private final Condition trip = lock.newCondition();
176 * Called only while holding lock.
188 * Called only while holding lock.
202 final ReentrantLock lock = this.lock;
203 lock.lock();
[all...]
H A DLinkedBlockingDeque.java84 * single lock and using conditions to manage blocking.
158 /** Main lock guarding all access */
159 final ReentrantLock lock = new ReentrantLock(); field in class:LinkedBlockingDeque
162 private final Condition notEmpty = lock.newCondition();
165 private final Condition notFull = lock.newCondition();
202 // Basic linking and unlinking operations, called only while holding lock
208 // assert lock.isHeldByCurrentThread();
227 // assert lock.isHeldByCurrentThread();
246 // assert lock.isHeldByCurrentThread();
268 // assert lock
[all...]
H A DArrayBlockingQueue.java119 /** Main lock guarding all access */
120 final ReentrantLock lock; field in class:ArrayBlockingQueue
174 * Call only when holding lock.
177 // assert lock.isHeldByCurrentThread();
178 // assert lock.getHoldCount() == 1;
189 * Call only when holding lock.
192 // assert lock.isHeldByCurrentThread();
193 // assert lock.getHoldCount() == 1;
210 * Call only when holding lock.
213 // assert lock
[all...]
H A DPriorityBlockingQueue.java118 * operations protected with a single lock. However, allocation
120 * holding main lock) in order to allow takes to operate
123 * build-up. The need to back away from lock during allocation
125 * java.util.PriorityQueue operations within a lock, as was done
169 private final ReentrantLock lock; field in class:PriorityBlockingQueue
226 this.lock = new ReentrantLock();
227 this.notEmpty = lock.newCondition();
249 this.lock = new ReentrantLock();
250 this.notEmpty = lock.newCondition();
286 * holding lock
[all...]
/openjdk10/jdk/src/java.base/share/classes/java/util/
H A DTimerTask.java44 final Object lock = new Object(); field in class:TimerTask
121 synchronized(lock) {
157 synchronized(lock) {
/openjdk10/jdk/test/java/awt/event/InvocationEvent/
H A DInvocationEventTest.java50 Object lock = new Object();
51 InvocationEvent event = new InvocationEvent(tk, runnable, lock, true);
57 synchronized(lock) {
60 lock.wait();
/openjdk10/jdk/src/java.management/share/classes/sun/management/
H A DSensor.java51 private Object lock; field in class:Sensor
65 this.lock = new Object();
83 synchronized (lock) {
96 synchronized (lock) {
106 synchronized (lock) {
118 synchronized (lock) {
132 synchronized (lock) {
144 synchronized (lock) {
156 synchronized (lock) {
/openjdk10/jdk/test/java/nio/channels/FileChannel/
H A DLock.java34 * Testing FileChannel's lock method.
64 FileLock lock = null;
66 // grab the lock
68 lock = fc.lock(0, 10, false);
69 if (lock == null)
72 fc.lock(5, 10, false);
116 if (lock != null) {
117 lock.release();
118 lock
[all...]
/openjdk10/jdk/src/java.base/share/classes/java/io/
H A DWriter.java68 protected Object lock; field in class:Writer
75 this.lock = this;
82 * @param lock
85 protected Writer(Object lock) { argument
86 if (lock == null) {
89 this.lock = lock;
107 synchronized (lock) {
192 synchronized (lock) {
H A DReader.java60 protected Object lock; field in class:Reader
67 this.lock = this;
74 * @param lock The Object to synchronize on.
76 protected Reader(Object lock) { argument
77 if (lock == null) {
80 this.lock = lock;
183 synchronized (lock) {
/openjdk10/jdk/src/jdk.management.agent/share/classes/jdk/internal/agent/
H A DFileSystem.java38 private static final Object lock = new Object(); field in class:FileSystem
47 synchronized (lock) {
/openjdk10/jdk/test/sun/awt/AppContext/8012933/
H A DTest8012933.java39 final Object lock = new Object(); field in class:Test8012933
67 synchronized (lock) {
69 lock.notifyAll();
75 synchronized (lock) {
79 lock.wait();
/openjdk10/jdk/test/javax/swing/text/html/parser/Parser/8028616/
H A Dbug8028616.java37 private static Object lock = new Object(); field in class:bug8028616
48 synchronized (lock) {
50 lock.wait(5000);
66 synchronized (lock) {
72 lock.notifyAll();
/openjdk10/jdk/test/java/awt/EventQueue/InvocationEventTest/
H A DInvocationEventTest.java54 Object lock = new Object(); field in class:InvocationEventTest
78 InvocationEvent invoc = new InvocationEvent(this, () -> { threadStatus = true; }, lock, false);
84 synchronized (lock) {
85 lock.wait(delay);
112 invoc = new InvocationEvent(this, () -> { threadStatus = true; throw sampleExn; }, lock, true);
115 synchronized (lock) {
116 lock.wait(delay);
184 invocation = new InvocationEvent(this, thread, lock, false);
189 synchronized (lock) {
190 lock
[all...]
/openjdk10/jdk/test/java/util/concurrent/locks/Lock/
H A DCheckedLockLoops.java76 System.out.print("builtin lock ");
124 throw new Error("lock protection failure");
175 private final ReentrantLock lock = new ReentrantLock(); field in class:CheckedLockLoops.ReentrantLockLoop
177 final ReentrantLock lock = this.lock;
181 lock.lock();
186 lock.unlock();
195 private final Mutex lock = new Mutex(); field in class:CheckedLockLoops.MutexLoop
197 final Mutex lock
215 private final ReentrantLock lock = new ReentrantLock(true); field in class:CheckedLockLoops.FairReentrantLockLoop
235 private final Lock lock = new ReentrantReadWriteLock().writeLock(); field in class:CheckedLockLoops.ReentrantWriteLockLoop
255 final Lock lock = new ReentrantReadWriteLock(true).writeLock(); field in class:CheckedLockLoops.FairReentrantWriteLockLoop
315 private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); field in class:CheckedLockLoops.ReentrantReadWriteLockLoop
348 private final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true); field in class:CheckedLockLoops.FairReentrantReadWriteLockLoop
[all...]
/openjdk10/jdk/src/java.desktop/windows/native/libjsound/
H A DPLATFORM_API_WinOS_Util.c59 CRITICAL_SECTION* lock = (CRITICAL_SECTION*) malloc(sizeof(CRITICAL_SECTION)); local
60 InitializeCriticalSection(lock);
62 return lock;
65 void MIDI_DestroyLock(void* lock) { argument
66 if (lock) {
67 DeleteCriticalSection((CRITICAL_SECTION*) lock);
68 free(lock);
73 void MIDI_Lock(void* lock) { argument
74 if (lock) {
75 EnterCriticalSection((CRITICAL_SECTION*) lock);
79 MIDI_Unlock(void* lock) argument
[all...]
/openjdk10/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/
H A DCFRetainedResource.java43 private final ReadWriteLock lock = new ReentrantReadWriteLock(); field in class:CFRetainedResource
44 private final Lock writeLock = lock.writeLock();
45 private final Lock readLock = lock.readLock();
61 writeLock.lock();
77 writeLock.lock();
125 * recomended to not use any external lock in action. If the current
131 readLock.lock();
145 * recomended to not use any external lock in action. If the current
154 readLock.lock();

Completed in 465 milliseconds

1234567891011>>