Lines Matching refs:rb_node
46 static inline void rb_set_black(struct rb_node *rb) in rb_set_black()
51 static inline struct rb_node *rb_red_parent(struct rb_node *red) in rb_red_parent()
53 return (struct rb_node *)red->__rb_parent_color; in rb_red_parent()
62 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents()
65 struct rb_node *parent = rb_parent(old); in __rb_rotate_set_parents()
72 __rb_insert(struct rb_node *node, struct rb_root *root, in __rb_insert()
73 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert()
75 struct rb_node *parent = rb_red_parent(node), *gparent, *tmp; in __rb_insert()
201 ____rb_erase_color(struct rb_node *parent, struct rb_root *root, in ____rb_erase_color()
202 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color()
204 struct rb_node *node = NULL, *sibling, *tmp1, *tmp2; in ____rb_erase_color()
363 void __rb_erase_color(struct rb_node *parent, struct rb_root *root, in __rb_erase_color()
364 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color()
376 static inline void dummy_propagate(struct rb_node *node, struct rb_node *stop) {} in dummy_propagate()
377 static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {} in dummy_copy()
378 static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} in dummy_rotate()
384 void rb_insert_color(struct rb_node *node, struct rb_root *root) in rb_insert_color()
389 void rb_erase(struct rb_node *node, struct rb_root *root) in rb_erase()
391 struct rb_node *rebalance; in rb_erase()
404 void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, in __rb_insert_augmented()
405 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented()
413 struct rb_node *rb_first(const struct rb_root *root) in rb_first()
415 struct rb_node *n; in rb_first()
417 n = root->rb_node; in rb_first()
425 struct rb_node *rb_last(const struct rb_root *root) in rb_last()
427 struct rb_node *n; in rb_last()
429 n = root->rb_node; in rb_last()
437 struct rb_node *rb_next(const struct rb_node *node) in rb_next()
439 struct rb_node *parent; in rb_next()
452 return (struct rb_node *)node; in rb_next()
468 struct rb_node *rb_prev(const struct rb_node *node) in rb_prev()
470 struct rb_node *parent; in rb_prev()
483 return (struct rb_node *)node; in rb_prev()
496 void rb_replace_node(struct rb_node *victim, struct rb_node *new, in rb_replace_node()
499 struct rb_node *parent = rb_parent(victim); in rb_replace_node()
512 static struct rb_node *rb_left_deepest_node(const struct rb_node *node) in rb_left_deepest_node()
520 return (struct rb_node *)node; in rb_left_deepest_node()
524 struct rb_node *rb_next_postorder(const struct rb_node *node) in rb_next_postorder()
526 const struct rb_node *parent; in rb_next_postorder()
539 return (struct rb_node *)parent; in rb_next_postorder()
542 struct rb_node *rb_first_postorder(const struct rb_root *root) in rb_first_postorder()
544 if (!root->rb_node) in rb_first_postorder()
547 return rb_left_deepest_node(root->rb_node); in rb_first_postorder()