code: final boolean transferForSignal(Node node) {
          /*
           * If cannot change waitStatus, the node has been cancelled.
           */
          if (!node.compareAndSetWaitStatus(Node.CONDITION, 0))
              return false;
  
          /*
           * Splice onto queue and try to set waitStatus of predecessor to
           * indicate that thread is (probably) waiting. If cancelled or
           * attempt to set waitStatus fails, wake up to resync (in which
           * case the waitStatus can be transiently and harmlessly wrong).
           */
          Node p = enq(node);
          int ws = p.waitStatus;
          if (ws > 0 || !p.compareAndSetWaitStatus(ws, Node.SIGNAL))
              LockSupport.unpark(node.thread);
          return true;
      }
docs: Transfers a node from a condition queue onto sync queue.
  Returns true if successful.
  @param node the node
  @return true if successfully transferred (else the node was
  cancelled before signal)