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.11 by jsr166, Thu Mar 19 04:49:44 2009 UTC vs.
Revision 1.12 by jsr166, Thu Mar 19 05:10:42 2009 UTC

# Line 399 | Line 399 | public class Phaser {
399              phase = phaseOf(s);
400              int unarrived = unarrivedOf(s) + registrations;
401              int parties = partiesOf(s) + registrations;
402 <            if (phase < 0)
402 >            if (phase < 0)
403                  break;
404              if (parties > ushortMask || unarrived > ushortMask)
405                  throw new IllegalStateException(badBounds(parties, unarrived));
# Line 557 | Line 557 | public class Phaser {
557       * @return the phase on exit from this method
558       * @throws InterruptedException if thread interrupted while waiting
559       */
560 <    public int awaitAdvanceInterruptibly(int phase)
560 >    public int awaitAdvanceInterruptibly(int phase)
561          throws InterruptedException {
562          if (phase < 0)
563              return phase;
# Line 795 | Line 795 | public class Phaser {
795                  try {
796                      ForkJoinPool.managedBlock(this, false);
797                  } catch (InterruptedException ie) {
798 <                }
798 >                }
799              }
800              return wasInterrupted;
801          }
# Line 933 | Line 933 | public class Phaser {
933              throws NoSuchFieldException, IllegalAccessException {
934          Field f = Unsafe.class.getDeclaredField("theUnsafe");
935          f.setAccessible(true);
936 <        return (Unsafe)f.get(null);
936 >        return (Unsafe) f.get(null);
937      }
938  
939      private static long fieldOffset(String fieldName)
# Line 949 | Line 949 | public class Phaser {
949          try {
950              _unsafe = getUnsafe();
951              stateOffset = fieldOffset("state");
952 <        } catch (Exception e) {
952 >        } catch (Throwable e) {
953              throw new RuntimeException("Could not initialize intrinsics", e);
954          }
955      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines