Lines Matching refs:last

98      * "last" node terminating any chain of next references starting at
99 * a live node. The "first" and "last" nodes may or may not be live.
100 * The "first" and "last" nodes are always mutually reachable.
103 * next reference in the first or last node to a fresh node
108 * first or last node. Active nodes cannot be unlinked.
122 * The head and tail are only approximations to the first and last
145 * prev links from the last node. However, this is not true for
194 * dummy node, NEXT_TERMINATOR, and not the last active node.
198 * find the last (active) node, for enqueueing a new node, we need
234 * - head may not be reachable from the first or last node, or from tail
239 * A node from which the last node on list (that is, the unique node p
242 * - the last node is always O(1) reachable from tail via next links
243 * - all live nodes are reachable from the last node via pred()
248 * - tail may not be reachable from the first or last node, or from head
357 * Links e as last element.
374 // p is last node
537 * Unlinks non-null last node.
539 private void unlinkLast(Node<E> last, Node<E> prev) {
540 // assert last != null;
542 // assert last.item == null;
545 if (o != null && p.next != p && last.casPrev(prev, p)) {
547 if (last.next == null &&
549 p.next == last) {
608 // trying to cas it to the last node until it does.
704 * Returns the predecessor of p, or the last node if p.prev has been
710 return (p == q) ? last() : q;
739 * Returns the last node, the unique node p for which:
744 Node<E> last() {
916 for (Node<E> p = last(); p != null; p = pred(p)) {
950 for (Node<E> p = last(); p != null; p = pred(p)) {
1028 * Removes the last element {@code e} such that
1038 for (Node<E> p = last(); p != null; p = pred(p)) {
1131 Node<E> beginningOfTheEnd = null, last = null;
1136 beginningOfTheEnd = last = newNode;
1138 last.lazySetNext(newNode);
1139 newNode.lazySetPrev(last);
1140 last = newNode;
1158 // p is last node
1163 if (!casTail(t, last)) {
1167 if (last.next == null)
1168 casTail(t, last);
1187 * proper sequence (from first to last element).
1204 * in proper sequence (from first to last element); the runtime
1245 * The elements will be returned in order from first (head) to last (tail).
1263 * last (tail) to first (head).
1357 Node<E> startNode() { return last(); }