question: private Node addWaiter ( Node mode ) { Node node = new Node ( Thread . currentThread ( ) , mode ) ; Node pred = tail ; if ( pred != null ) { node . prev = pred ; if ( compareAndSetTail ( pred , node ) ) { pred . next = node ; return node ; } } enq ( node ) ; return node ; }
target:  Creates and enqueues node for current thread and given mode.