Home | History | Annotate | Download | only in lib

Lines Matching defs:cur

171 	struct prio_tree_node *cur, *res = node;
182 cur = root->prio_tree_node;
186 get_index(cur, &r_index, &h_index);
189 return cur;
194 node = prio_tree_replace(root, cur, node);
195 cur = tmp;
211 if (prio_tree_right_empty(cur)) {
213 cur->right = node;
214 node->parent = cur;
217 cur = cur->right;
219 if (prio_tree_left_empty(cur)) {
221 cur->left = node;
222 node->parent = cur;
225 cur = cur->left;
247 struct prio_tree_node *cur;
250 cur = node;
252 while (!prio_tree_left_empty(cur) || !prio_tree_right_empty(cur)) {
253 if (!prio_tree_left_empty(cur))
254 get_index(cur->left, &r_index, &h_index_left);
256 cur = cur->right;
260 if (!prio_tree_right_empty(cur))
261 get_index(cur->right, &r_index, &h_index_right);
263 cur = cur->left;
269 cur = cur->left;
271 cur = cur->right;
274 if (prio_tree_root(cur)) {
275 assert(root->prio_tree_node == cur);
280 if (cur->parent->right == cur)
281 cur->parent->right = cur->parent;
283 cur->parent->left = cur->parent;
285 while (cur != node)
286 cur = prio_tree_replace(root, cur->parent, cur);
300 if (prio_tree_left_empty(iter->cur))
303 get_index(iter->cur->left, r_index, h_index);
306 iter->cur = iter->cur->left;
313 assert(prio_tree_left_empty(iter->cur));
314 assert(prio_tree_right_empty(iter->cur));
322 return iter->cur;
333 if (prio_tree_right_empty(iter->cur))
344 get_index(iter->cur->right, r_index, h_index);
347 iter->cur = iter->cur->right;
355 assert(prio_tree_left_empty(iter->cur));
356 assert(prio_tree_right_empty(iter->cur));
364 return iter->cur;
372 iter->cur = iter->cur->parent;
383 return iter->cur;
416 iter->cur = root->prio_tree_node;
420 return iter->cur;
442 if (iter->cur == NULL)
448 return iter->cur;
451 while (!prio_tree_root(iter->cur) &&
452 iter->cur->parent->right == iter->cur)
455 if (prio_tree_root(iter->cur))
462 return iter->cur;