ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/SequenceLock.java
(Generate patch)

Comparing jsr166/src/jsr166e/SequenceLock.java (file contents):
Revision 1.14 by jsr166, Sat Sep 10 01:44:53 2011 UTC vs.
Revision 1.17 by jsr166, Mon Dec 19 19:18:35 2011 UTC

# Line 109 | Line 109 | public class SequenceLock implements Loc
109      private static final long serialVersionUID = 7373984872572414699L;
110  
111      static final class Sync extends AbstractQueuedLongSynchronizer {
112 +        static final long serialVersionUID = 2540673546047039555L;
113 +
114          /**
115           * The number of times to spin in lock() and awaitAvailability().
116           */
# Line 160 | Line 162 | public class SequenceLock implements Loc
162  
163          public final long tryAcquireShared(long unused) {
164              return (((getState() & 1L) == 0L) ? 1L :
165 <                    (getExclusiveOwnerThread() == Thread.currentThread()) ?  0L:
165 >                    (getExclusiveOwnerThread() == Thread.currentThread()) ? 0L:
166                      -1L);
167          }
168  
# Line 501 | Line 503 | public class SequenceLock implements Loc
503       * @throws IllegalMonitorStateException if the current thread does not
504       *         hold this lock
505       */
506 <    public void unlock()              { sync.release(1); }
506 >    public void unlock() { sync.release(1); }
507  
508      /**
509       * Throws UnsupportedOperationException. SequenceLocks
# Line 509 | Line 511 | public class SequenceLock implements Loc
511       *
512       * @throws UnsupportedOperationException
513       */
514 <    public Condition newCondition()   {
514 >    public Condition newCondition() {
515          throw new UnsupportedOperationException();
516      }
517  
# Line 525 | Line 527 | public class SequenceLock implements Loc
527       * @return the number of holds on this lock by the current thread,
528       *         or zero if this lock is not held by the current thread
529       */
530 <    public long getHoldCount() { return sync.getHoldCount();  }
530 >    public long getHoldCount() { return sync.getHoldCount(); }
531  
532      /**
533       * Queries if this lock is held by the current thread.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines