private void releaseWaiters(int phase){
  QNode q;
  Thread t;
  AtomicReference<QNode> head=(phase & 1) == 0 ? evenQ : oddQ;
  while ((q=head.get()) != null && q.phase != (int)(root.state >>> PHASE_SHIFT)) {
    if (head.compareAndSet(q,q.next) && (t=q.thread) != null) {
      q.thread=null;
      LockSupport.unpark(t);
    }
  }
}

private void releaseWaiters ( int phase ) { QNode q ; Thread t ; AtomicReference < QNode > head = ( phase & 1 ) == 0 ? evenQ : oddQ ; while ( ( q = head . get ( ) ) != null && q . phase != ( int ) ( root . state > > > PHASE_SHIFT ) ) { if ( head . compareAndSet ( q , q . next ) && ( t = q . thread ) != null ) { q . thread = null ; LockSupport . unpark ( t ) ; } } }
removes and signals threads from queue for phase .
