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

Comparing jsr166/src/jsr166y/ForkJoinTask.java (file contents):
Revision 1.10 by jsr166, Tue Jul 21 00:15:13 2009 UTC vs.
Revision 1.11 by jsr166, Tue Jul 21 18:11:44 2009 UTC

# Line 162 | Line 162 | public abstract class ForkJoinTask<V> im
162      }
163  
164      final boolean casStatus(int cmp, int val) {
165 <        return _unsafe.compareAndSwapInt(this, statusOffset, cmp, val);
165 >        return UNSAFE.compareAndSwapInt(this, statusOffset, cmp, val);
166      }
167  
168      /**
# Line 170 | Line 170 | public abstract class ForkJoinTask<V> im
170       */
171      static void rethrowException(Throwable ex) {
172          if (ex != null)
173 <            _unsafe.throwException(ex);
173 >            UNSAFE.throwException(ex);
174      }
175  
176      // Setting completion status
# Line 213 | Line 213 | public abstract class ForkJoinTask<V> im
213      final void setNormalCompletion() {
214          // Try typical fast case -- single CAS, no signal, not already done.
215          // Manually expand casStatus to improve chances of inlining it
216 <        if (!_unsafe.compareAndSwapInt(this, statusOffset, 0, NORMAL))
216 >        if (!UNSAFE.compareAndSwapInt(this, statusOffset, 0, NORMAL))
217              setCompletion(NORMAL);
218      }
219  
# Line 1053 | Line 1053 | public abstract class ForkJoinTask<V> im
1053  
1054      private static long fieldOffset(String fieldName)
1055              throws NoSuchFieldException {
1056 <        return _unsafe.objectFieldOffset
1056 >        return UNSAFE.objectFieldOffset
1057              (ForkJoinTask.class.getDeclaredField(fieldName));
1058      }
1059  
1060 <    static final Unsafe _unsafe;
1060 >    static final Unsafe UNSAFE;
1061      static final long statusOffset;
1062  
1063      static {
1064          try {
1065 <            _unsafe = getUnsafe();
1065 >            UNSAFE = getUnsafe();
1066              statusOffset = fieldOffset("status");
1067          } catch (Throwable e) {
1068              throw new RuntimeException("Could not initialize intrinsics", e);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines