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)); |
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; |
795 |
|
try { |
796 |
|
ForkJoinPool.managedBlock(this, false); |
797 |
|
} catch (InterruptedException ie) { |
798 |
< |
} |
798 |
> |
} |
799 |
|
} |
800 |
|
return wasInterrupted; |
801 |
|
} |
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) |
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 |
|
} |