question: 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 ) ; } } }
target:  Removes and signals threads from queue for phase.