Searched defs:locks (Results 1 - 23 of 23) sorted by relevance

/openjdk7/jdk/src/share/classes/java/util/concurrent/locks/
H A Dpackage-info.java40 * locks and conditions, at the expense of more awkward syntax.
42 * <p>The {@link java.util.concurrent.locks.Lock} interface supports
46 * is {@link java.util.concurrent.locks.ReentrantLock}.
48 * <p>The {@link java.util.concurrent.locks.ReadWriteLock} interface
49 * similarly defines locks that may be shared among readers but are
51 * java.util.concurrent.locks.ReentrantReadWriteLock}, is provided, since
55 * <p>The {@link java.util.concurrent.locks.Condition} interface
64 * <p>The {@link java.util.concurrent.locks.AbstractQueuedSynchronizer}
65 * class serves as a useful superclass for defining locks and other
67 * java.util.concurrent.locks
[all...]
H A DReadWriteLock.java36 package java.util.concurrent.locks;
40 * Lock locks}, one for read-only operations and one for writing.
100 * <li>Determining whether the locks are reentrant: can a thread with the
H A DAbstractOwnableSynchronizer.java36 package java.util.concurrent.locks;
40 * class provides a basis for creating locks and related synchronizers
H A DCondition.java36 package java.util.concurrent.locks;
H A DLock.java36 package java.util.concurrent.locks;
50 * acquired first. However, some locks may allow concurrent access to
56 * when multiple locks are acquired they must be released in the opposite
57 * order, and all locks must be released in the same lexical scope in which
61 * and statements makes it much easier to program with monitor locks,
62 * and helps avoid many common programming errors involving locks,
63 * there are occasions where you need to work with locks in a more
71 * and allowing multiple locks to be acquired and released in any
76 * automatic release of locks that occurs with {@code synchronized}
H A DLockSupport.java36 package java.util.concurrent.locks;
42 * Basic thread blocking primitives for creating locks and other
H A DReentrantLock.java36 package java.util.concurrent.locks;
57 * contention, locks favor granting access to the longest-waiting
59 * access order. Programs using fair locks accessed by many threads
62 * variances in times to obtain locks and guarantee lack of
63 * starvation. Note however, that fairness of locks does not guarantee
99 * locks: a deserialized lock is in the unlocked state, regardless of
102 * <p>This lock supports a maximum of 2147483647 recursive locks by
201 * Sync object for non-fair locks
223 * Sync object for fair locks
495 * but for <em>fair</em> locks favor
[all...]
H A DReentrantReadWriteLock.java36 package java.util.concurrent.locks;
91 * write locks in the style of a {@link ReentrantLock}. Non-reentrant
92 * readers are not allowed until all write locks held by the writing
97 * when write locks are held during calls or callbacks to methods that
98 * perform reads under read locks. If a reader tries to acquire the
123 * <p>This class supports methods to determine whether locks
129 * locks: a deserialized lock is in the unlocked state, regardless of
134 * particularly tricky when handling multiple locks in a non-nested
210 * <p>This lock supports a maximum of 65535 recursive write locks
211 * and 65535 read locks
[all...]
H A DAbstractQueuedLongSynchronizer.java36 package java.util.concurrent.locks;
50 * multilevel locks and barriers that require
82 * Hagersten) lock queue. CLH locks are normally used for
91 * granted locks etc though. A thread may try to acquire if it is
112 * <p>The "prev" links (not used in original CLH locks), are mainly
116 * of spin locks, see the papers by Scott and Scherer at
H A DAbstractQueuedSynchronizer.java36 package java.util.concurrent.locks;
43 * Provides a framework for implementing blocking locks and related
63 * appropriate by concrete locks and related synchronizers to
130 * determining which threads hold locks.
305 * Hagersten) lock queue. CLH locks are normally used for
314 * granted locks etc though. A thread may try to acquire if it is
335 * <p>The "prev" links (not used in original CLH locks), are mainly
339 * of spin locks, see the papers by Scott and Scherer at
/openjdk7/jdk/test/java/nio/channels/FileChannel/
H A DReleaseOnCloseDeadlock.java52 FileLock[] locks = new FileLock[LOCK_COUNT];
56 locks[i] = fc.lock(i, 1, true);
58 tryToDeadlock(fc, locks);
63 locks[i] = ch.lock(i, 1, true).get();
70 tryToDeadlock(ch, locks);
73 static void tryToDeadlock(final Channel channel, FileLock[] locks) argument
76 // start thread to close the file (and invalidate the locks)
88 // release the locks explicitly
89 for (int i=0; i<locks.length; i++) {
91 locks[
[all...]
/openjdk7/jdk/test/java/lang/management/ThreadMXBean/
H A DThreadDump.java92 public static void printLockInfo(LockInfo[] locks) { argument
93 System.out.println(INDENT + "Locked synchronizers: count = " + locks.length);
94 for (LockInfo li : locks) {
/openjdk7/jdk/src/share/classes/sun/tools/jstack/
H A DJStack.java50 boolean locks = false;
66 locks = true;
102 runJStackTool(mixed, locks, params);
107 if (locks) {
118 private static void runJStackTool(boolean mixed, boolean locks, String args[]) throws Exception { argument
128 if (locks) {
225 System.out.println(" -l long listing. Prints additional information about locks");
/openjdk7/jdk/src/share/demo/management/FullThreadDump/
H A DThreadMonitor.java123 * Prints the thread dump information with locks info to System.out.
126 System.out.println("Full Java thread dump with locks info");
143 // print stack trace with locks
188 private void printLockInfo(LockInfo[] locks) { argument
189 System.out.println(INDENT + "Locked synchronizers: count = " + locks.length);
190 for (LockInfo li : locks) {
248 // synchronizers and locks cannot be dumped.
/openjdk7/jdk/test/java/util/concurrent/locks/ReentrantLock/
H A DLockOncePerThreadLoops.java39 * @summary Checks for missed signals by locking and unlocking each of an array of locks once per thread
43 import java.util.concurrent.locks.*;
76 final ReentrantLock[]locks = new ReentrantLock[nlocks]; field in class:LockOncePerThreadLoops.ReentrantLockLoop
84 locks[i] = new ReentrantLock();
108 for (int i = 0; i < locks.length; ++i) {
109 locks[i].lock();
114 locks[i].unlock();
/openjdk7/corba/src/share/classes/com/sun/corba/se/impl/protocol/
H A DCorbaClientRequestDispatcherImpl.java128 private ConcurrentMap<ContactInfo, Object> locks = field in class:CorbaClientRequestDispatcherImpl
161 Object lock = locks.get(contactInfo);
165 lock = locks.putIfAbsent(contactInfo, newLock);
/openjdk7/jdk/src/share/classes/java/util/logging/
H A DFileHandler.java130 private static java.util.HashMap<String, String> locks = new java.util.HashMap<>(); field in class:FileHandler
394 // Because some systems (e.g., Solaris) can only do file locks
397 synchronized(locks) {
398 if (locks.get(lockFileName) != null) {
425 locks.put(lockFileName, lockFileName);
606 // the underlying channel and free any locks.
611 synchronized(locks) {
612 locks.remove(lockFileName);
/openjdk7/hotspot/src/share/vm/runtime/
H A DvframeArray.cpp270 int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors(); local
275 locks, local
290 assert (!method()->is_synchronized() || locks > 0, "synchronized methods must have monitors");
293 for (int index = 0; index < locks; index++) {
430 int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors(); local
435 locks,
H A Dmutex.cpp584 // Unlike a normal lock, however, the exiting thread "locks" OnDeck,
607 // For heavily contended locks it's not uncommon that some other
867 // written the _owner field. These locks may be sneakily acquired by the
869 // identify all such locks, and ensure that Java threads never block at
883 // VM thread to logically acquire locks that had already be physically locked by mutators
1218 Monitor * Monitor::get_least_ranked_lock(Monitor * locks) { argument
1220 for (res = tmp = locks; tmp != NULL; tmp = tmp->next()) {
1226 // In this case, we expect the held locks to be
1228 for (tmp = locks; tmp != NULL; tmp = tmp->next()) {
1238 Monitor* Monitor::get_least_ranked_lock_besides_this(Monitor* locks) { argument
1259 contains(Monitor* locks, Monitor * lock) argument
1294 Monitor* locks = get_least_ranked_lock(new_owner->owned_locks()); local
1340 Monitor *locks = old_owner->owned_locks(); local
[all...]
/openjdk7/hotspot/src/share/vm/services/
H A DthreadService.cpp289 // Find deadlocks involving object monitors and concurrent locks if concurrent_locks is true
614 // dump all locked concurrent locks
625 // Build a map of thread to its owned AQS locks
675 GrowableArray<instanceOop>* locks = (tcl != NULL ? tcl->owned_locks() : NULL); local
676 if (locks == NULL || locks->is_empty()) {
682 for (int i = 0; i < locks->length(); i++) {
683 instanceOop obj = locks->at(i);
769 // Support for JSR-166 locks
H A Dmanagement.cpp1380 GrowableArray<instanceOop>* locks = (tcl != NULL ? tcl->owned_locks() : NULL); variable
1381 int num_locked_synchronizers = (locks != NULL ? locks->length() : 0);
1388 synchronizers_array->obj_at_put(k, locks->at(k));
1921 VM_FindDeadlocks op(!object_monitors_only /* also check concurrent locks? */);
1964 // Finds cycles of threads that are deadlocked on monitor locks
/openjdk7/hotspot/src/share/vm/opto/
H A Dcallnode.cpp1277 // locks inside the then and else branches are eliminated.
1323 // giving up eliminating the locks. The current code disallows any
1520 // up trying to merge locks.
1570 // to eliminate all associated locks/unlocks.
1600 // found unlock splitting to an if with locks on both branches.
1605 // add ourselves to the list of locks to be eliminated.
1610 int locks = 0; local
1615 locks++;
1622 tty->print_cr("***Eliminated %d unlocks and %d locks", unlocks, locks);
[all...]
/openjdk7/langtools/src/share/classes/com/sun/tools/javac/jvm/
H A DCode.java1601 int[] locks; field in class:Code.State
1614 if (locks != null) state.locks = locks.clone();
1626 if (locks == null) {
1627 locks = new int[20];
1628 } else if (locks.length == nlocks) {
1629 int[] newLocks = new int[locks.length << 1];
1630 System.arraycopy(locks, 0, newLocks, 0, locks
[all...]

Completed in 138 milliseconds