Lines Matching full:nodes

21  * Roll nodes[1] into nodes[0] by advancing nodes[1] to the end of a contiguous
22 * span of nodes. This makes nodes[0]->last the end of that contiguous used span
23 * indexes that started at the original nodes[1]->start. nodes[1] is now the
24 * first node starting the next used span. A hole span is between nodes[0]->last
25 * and nodes[1]->start. nodes[1] must be !NULL.
30 struct interval_tree_node *cur = state->nodes[1]; in interval_tree_span_iter_next_gap()
32 state->nodes[0] = cur; in interval_tree_span_iter_next_gap()
34 if (cur->last > state->nodes[0]->last) in interval_tree_span_iter_next_gap()
35 state->nodes[0] = cur; in interval_tree_span_iter_next_gap()
38 } while (cur && (state->nodes[0]->last >= cur->start || in interval_tree_span_iter_next_gap()
39 state->nodes[0]->last + 1 == cur->start)); in interval_tree_span_iter_next_gap()
40 state->nodes[1] = cur; in interval_tree_span_iter_next_gap()
50 iter->nodes[0] = NULL; in interval_tree_span_iter_first()
51 iter->nodes[1] = in interval_tree_span_iter_first()
53 if (!iter->nodes[1]) { in interval_tree_span_iter_first()
54 /* No nodes intersect the span, whole span is hole */ in interval_tree_span_iter_first()
60 if (iter->nodes[1]->start > first_index) { in interval_tree_span_iter_first()
63 iter->last_hole = iter->nodes[1]->start - 1; in interval_tree_span_iter_first()
73 iter->last_used = iter->nodes[0]->last; in interval_tree_span_iter_first()
76 iter->nodes[0] = NULL; in interval_tree_span_iter_first()
77 iter->nodes[1] = NULL; in interval_tree_span_iter_first()
84 if (!iter->nodes[0] && !iter->nodes[1]) { in interval_tree_span_iter_next()
91 iter->last_used = iter->nodes[0]->last; in interval_tree_span_iter_next()
94 iter->nodes[0] = NULL; in interval_tree_span_iter_next()
95 iter->nodes[1] = NULL; in interval_tree_span_iter_next()
101 if (!iter->nodes[1]) { in interval_tree_span_iter_next()
103 iter->start_hole = iter->nodes[0]->last + 1; in interval_tree_span_iter_next()
105 iter->nodes[0] = NULL; in interval_tree_span_iter_next()
110 /* must have both nodes[0] and [1], interior hole */ in interval_tree_span_iter_next()
111 iter->start_hole = iter->nodes[0]->last + 1; in interval_tree_span_iter_next()
112 iter->last_hole = iter->nodes[1]->start - 1; in interval_tree_span_iter_next()