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

Comparing jsr166/src/jsr166y/Phaser.java (file contents):
Revision 1.14 by jsr166, Tue Jul 21 00:15:14 2009 UTC vs.
Revision 1.15 by jsr166, Tue Jul 21 18:11:44 2009 UTC

# Line 953 | Line 953 | public class Phaser {
953  
954      private static long fieldOffset(String fieldName)
955              throws NoSuchFieldException {
956 <        return _unsafe.objectFieldOffset
956 >        return UNSAFE.objectFieldOffset
957              (Phaser.class.getDeclaredField(fieldName));
958      }
959  
960 <    static final Unsafe _unsafe;
960 >    static final Unsafe UNSAFE;
961      static final long stateOffset;
962  
963      static {
964          try {
965 <            _unsafe = getUnsafe();
965 >            UNSAFE = getUnsafe();
966              stateOffset = fieldOffset("state");
967          } catch (Throwable e) {
968              throw new RuntimeException("Could not initialize intrinsics", e);
# Line 970 | Line 970 | public class Phaser {
970      }
971  
972      final boolean casState(long cmp, long val) {
973 <        return _unsafe.compareAndSwapLong(this, stateOffset, cmp, val);
973 >        return UNSAFE.compareAndSwapLong(this, stateOffset, cmp, val);
974      }
975   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines