Skip to content

Commit

Permalink
Fix checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
daumayr committed Jan 14, 2019
1 parent adc3cd8 commit c84b334
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/som/vm/CustomPhaser.java
Expand Up @@ -357,7 +357,7 @@ private static int arrivedOf(final long s) {
}

/**
* The parent of this phaser, or null if none
* The parent of this phaser, or null if none.
*/
private final CustomPhaser parent;

Expand Down Expand Up @@ -447,7 +447,7 @@ private int doArrive(final int adjust) {
}

/**
* Implementation of register, bulkRegister
* Implementation of register, bulkRegister.
*
* @param registrations number to add to both parties and
* unarrived fields. Must be greater than zero.
Expand Down Expand Up @@ -520,7 +520,8 @@ private long reconcileState() {
final CustomPhaser root = this.root;
long s = state;
if (root != this) {
int phase, p;
int phase;
int p;
// CAS to root phase with current parties, tripping unarrived
while ((phase = (int) (root.state >>> PHASE_SHIFT)) != (int) (s >>> PHASE_SHIFT) &&
!UNSAFE.compareAndSwapLong(this, stateOffset, s,
Expand Down Expand Up @@ -1009,7 +1010,7 @@ public String toString() {
}

/**
* Implementation of toString and string-based error messages
* Implementation of toString and string-based error messages.
*/
private String stateToString(final long s) {
return super.toString() +
Expand Down Expand Up @@ -1062,7 +1063,7 @@ private int abortWait(final int phase) {
}
}

/** The number of CPUs, for spin control */
/** The number of CPUs, for spin control. */
private static final int NCPU = Runtime.getRuntime().availableProcessors();

/**
Expand All @@ -1087,6 +1088,7 @@ private int abortWait(final int phase) {
* if null, denotes noninterruptible wait
* @return current phase
*/
// CHECKSTYLE:OFF
private int internalAwaitAdvance(final int phase, QNode node) {
// assert root == this;
releaseWaiters(phase - 1); // ensure old queue clean
Expand Down Expand Up @@ -1136,9 +1138,10 @@ private int internalAwaitAdvance(final int phase, QNode node) {
releaseWaiters(phase);
return p;
}
// CHECKSTYLE:ON

/**
* Wait nodes for Treiber stack representing wait queue
* Wait nodes for Treiber stack representing wait queue.
*/
static final class QNode implements ForkJoinPool.ManagedBlocker {
final CustomPhaser phaser;
Expand Down

0 comments on commit c84b334

Please sign in to comment.