[cvs] / jsr166 / src / test / tck / AbstractQueuedSynchronizerTest.java Repository:
ViewVC logotype

Diff of /jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Sun Jan 4 00:57:21 2004 UTC revision 1.9, Wed Jan 7 01:02:17 2004 UTC
# Line 32  Line 32 
32          private static class Sync extends AbstractQueuedSynchronizer {          private static class Sync extends AbstractQueuedSynchronizer {
33              boolean isLocked() { return getState() == 1; }              boolean isLocked() { return getState() == 1; }
34    
35              public boolean tryAcquireExclusive(boolean isQueued, int acquires) {              public boolean tryAcquireExclusive(int acquires) {
36                  assert acquires == 1; // Does not use multiple acquires                  assert acquires == 1; // Does not use multiple acquires
37                  return compareAndSetState(0, 1);                  return compareAndSetState(0, 1);
38              }              }
# Line 57  Line 57 
57    
58          private final Sync sync = new Sync();          private final Sync sync = new Sync();
59          public boolean tryLock() {          public boolean tryLock() {
60              return sync.tryAcquireExclusive(false, 1);              return sync.tryAcquireExclusive(1);
61          }          }
62          public void lock() {          public void lock() {
63              sync.acquireExclusiveUninterruptibly(1);              sync.acquireExclusiveUninterruptibly(1);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8