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

Comparing jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java (file contents):
Revision 1.6 by dl, Wed Dec 31 21:30:08 2003 UTC vs.
Revision 1.7 by dl, Fri Jan 2 21:06:38 2004 UTC

# Line 32 | Line 32 | public class AbstractQueuedSynchronizerT
32          private static class Sync extends AbstractQueuedSynchronizer {
33              boolean isLocked() { return getState() == 1; }
34  
35 <            public boolean tryAcquireExclusiveState(boolean isQueued, int acquires) {
35 >            public boolean tryAcquireExclusive(boolean isQueued, int acquires) {
36                  assert acquires == 1; // Does not use multiple acquires
37                  return compareAndSetState(0, 1);
38              }
39              
40 <            public boolean releaseExclusiveState(int releases) {
40 >            public boolean tryReleaseExclusive(int releases) {
41                  setState(0);
42                  return true;
43              }
# Line 53 | Line 53 | public class AbstractQueuedSynchronizerT
53                  setState(0); // reset to unlocked state
54              }
55          }
56 <        
56 >        
57          private final Sync sync = new Sync();
58          public boolean tryLock() {
59 <            return sync.tryAcquireExclusiveState(false, 1);
59 >            return sync.tryAcquireExclusive(false, 1);
60          }
61          public void lock() {
62              sync.acquireExclusiveUninterruptibly(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines