summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/external/jsr166/java/util/concurrent/locks
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/external/jsr166/java/util/concurrent/locks')
-rw-r--r--libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java16
-rw-r--r--libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java16
-rw-r--r--libjava/classpath/external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java64
3 files changed, 48 insertions, 48 deletions
diff --git a/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java b/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java
index 88a4354bc71..45d744bb841 100644
--- a/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java
+++ b/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java
@@ -892,10 +892,10 @@ public abstract class AbstractQueuedLongSynchronizer
* @throws InterruptedException if the current thread is interrupted
*/
public final boolean tryAcquireNanos(long arg, long nanosTimeout) throws InterruptedException {
- if (Thread.interrupted())
- throw new InterruptedException();
- return tryAcquire(arg) ||
- doAcquireNanos(arg, nanosTimeout);
+ if (Thread.interrupted())
+ throw new InterruptedException();
+ return tryAcquire(arg) ||
+ doAcquireNanos(arg, nanosTimeout);
}
/**
@@ -971,10 +971,10 @@ public abstract class AbstractQueuedLongSynchronizer
* @throws InterruptedException if the current thread is interrupted
*/
public final boolean tryAcquireSharedNanos(long arg, long nanosTimeout) throws InterruptedException {
- if (Thread.interrupted())
- throw new InterruptedException();
- return tryAcquireShared(arg) >= 0 ||
- doAcquireSharedNanos(arg, nanosTimeout);
+ if (Thread.interrupted())
+ throw new InterruptedException();
+ return tryAcquireShared(arg) >= 0 ||
+ doAcquireSharedNanos(arg, nanosTimeout);
}
/**
diff --git a/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java b/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
index a3abb2cf553..647f4fcbcdb 100644
--- a/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
+++ b/libjava/classpath/external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
@@ -1119,10 +1119,10 @@ public abstract class AbstractQueuedSynchronizer
* @throws InterruptedException if the current thread is interrupted
*/
public final boolean tryAcquireNanos(int arg, long nanosTimeout) throws InterruptedException {
- if (Thread.interrupted())
- throw new InterruptedException();
- return tryAcquire(arg) ||
- doAcquireNanos(arg, nanosTimeout);
+ if (Thread.interrupted())
+ throw new InterruptedException();
+ return tryAcquire(arg) ||
+ doAcquireNanos(arg, nanosTimeout);
}
/**
@@ -1198,10 +1198,10 @@ public abstract class AbstractQueuedSynchronizer
* @throws InterruptedException if the current thread is interrupted
*/
public final boolean tryAcquireSharedNanos(int arg, long nanosTimeout) throws InterruptedException {
- if (Thread.interrupted())
- throw new InterruptedException();
- return tryAcquireShared(arg) >= 0 ||
- doAcquireSharedNanos(arg, nanosTimeout);
+ if (Thread.interrupted())
+ throw new InterruptedException();
+ return tryAcquireShared(arg) >= 0 ||
+ doAcquireSharedNanos(arg, nanosTimeout);
}
/**
diff --git a/libjava/classpath/external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java b/libjava/classpath/external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java
index df18a7c0884..a6eadff5b13 100644
--- a/libjava/classpath/external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java
+++ b/libjava/classpath/external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java
@@ -746,7 +746,7 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
/**
* Throws {@code UnsupportedOperationException} because
- * {@code ReadLocks} do not support conditions.
+ * {@code ReadLocks} do not support conditions.
*
* @throws UnsupportedOperationException always
*/
@@ -773,7 +773,7 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
*/
public static class WriteLock implements Lock, java.io.Serializable {
private static final long serialVersionUID = -4992448646407690164L;
- private final Sync sync;
+ private final Sync sync;
/**
* Constructor for use by subclasses
@@ -789,7 +789,7 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
* Acquires the write lock.
*
* <p>Acquires the write lock if neither the read nor write lock
- * are held by another thread
+ * are held by another thread
* and returns immediately, setting the write lock hold count to
* one.
*
@@ -811,7 +811,7 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
* {@linkplain Thread#interrupt interrupted}.
*
* <p>Acquires the write lock if neither the read nor write lock
- * are held by another thread
+ * are held by another thread
* and returns immediately, setting the write lock hold count to
* one.
*
@@ -866,7 +866,7 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
* at the time of invocation.
*
* <p>Acquires the write lock if neither the read nor write lock
- * are held by another thread
+ * are held by another thread
* and returns immediately with the value {@code true},
* setting the write lock hold count to one. Even when this lock has
* been set to use a fair ordering policy, a call to
@@ -900,7 +900,7 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
* not been {@linkplain Thread#interrupt interrupted}.
*
* <p>Acquires the write lock if neither the read nor write lock
- * are held by another thread
+ * are held by another thread
* and returns immediately with the value {@code true},
* setting the write lock hold count to one. If this lock has been
* set to use a fair ordering policy then an available lock
@@ -1053,32 +1053,32 @@ public class ReentrantReadWriteLock implements ReadWriteLock, java.io.Serializab
"[Locked by thread " + o.getName() + "]");
}
- /**
- * Queries if this write lock is held by the current thread.
- * Identical in effect to {@link
- * ReentrantReadWriteLock#isWriteLockedByCurrentThread}.
- *
- * @return {@code true} if the current thread holds this lock and
- * {@code false} otherwise
- * @since 1.6
- */
- public boolean isHeldByCurrentThread() {
- return sync.isHeldExclusively();
- }
-
- /**
- * Queries the number of holds on this write lock by the current
- * thread. A thread has a hold on a lock for each lock action
- * that is not matched by an unlock action. Identical in effect
- * to {@link ReentrantReadWriteLock#getWriteHoldCount}.
- *
- * @return the number of holds on this lock by the current thread,
- * or zero if this lock is not held by the current thread
- * @since 1.6
- */
- public int getHoldCount() {
- return sync.getWriteHoldCount();
- }
+ /**
+ * Queries if this write lock is held by the current thread.
+ * Identical in effect to {@link
+ * ReentrantReadWriteLock#isWriteLockedByCurrentThread}.
+ *
+ * @return {@code true} if the current thread holds this lock and
+ * {@code false} otherwise
+ * @since 1.6
+ */
+ public boolean isHeldByCurrentThread() {
+ return sync.isHeldExclusively();
+ }
+
+ /**
+ * Queries the number of holds on this write lock by the current
+ * thread. A thread has a hold on a lock for each lock action
+ * that is not matched by an unlock action. Identical in effect
+ * to {@link ReentrantReadWriteLock#getWriteHoldCount}.
+ *
+ * @return the number of holds on this lock by the current thread,
+ * or zero if this lock is not held by the current thread
+ * @since 1.6
+ */
+ public int getHoldCount() {
+ return sync.getWriteHoldCount();
+ }
}
// Instrumentation and status
OpenPOWER on IntegriCloud