• Home
  • Raw
  • Download

Lines Matching refs:rb

11 	struct rb_node rb;  member
31 if (key < rb_entry(parent, struct test_node, rb)->key) in insert()
37 rb_link_node(&node->rb, parent, new); in insert()
38 rb_insert_color(&node->rb, root); in insert()
43 rb_erase(&node->rb, root); in erase()
49 if (node->rb.rb_left) { in augment_recompute()
50 child_augmented = rb_entry(node->rb.rb_left, struct test_node, in augment_recompute()
51 rb)->augmented; in augment_recompute()
55 if (node->rb.rb_right) { in augment_recompute()
56 child_augmented = rb_entry(node->rb.rb_right, struct test_node, in augment_recompute()
57 rb)->augmented; in augment_recompute()
64 RB_DECLARE_CALLBACKS(static, augment_callbacks, struct test_node, rb, in RB_DECLARE_CALLBACKS() argument
76 parent = rb_entry(rb_parent, struct test_node, rb); in RB_DECLARE_CALLBACKS()
80 new = &parent->rb.rb_left; in RB_DECLARE_CALLBACKS()
82 new = &parent->rb.rb_right; in RB_DECLARE_CALLBACKS()
86 rb_link_node(&node->rb, rb_parent, new); in RB_DECLARE_CALLBACKS()
87 rb_insert_augmented(&node->rb, root, &augment_callbacks); in RB_DECLARE_CALLBACKS()
92 rb_erase_augmented(&node->rb, root, &augment_callbacks); in erase_augmented()
104 static bool is_red(struct rb_node *rb) in is_red() argument
106 return !(rb->__rb_parent_color & 1); in is_red()
109 static int black_path_count(struct rb_node *rb) in black_path_count() argument
112 for (count = 0; rb; rb = rb_parent(rb)) in black_path_count()
113 count += !is_red(rb); in black_path_count()
119 struct rb_node *rb; in check() local
123 for (rb = rb_first(&root); rb; rb = rb_next(rb)) { in check()
124 struct test_node *node = rb_entry(rb, struct test_node, rb); in check()
126 WARN_ON_ONCE(is_red(rb) && in check()
127 (!rb_parent(rb) || is_red(rb_parent(rb)))); in check()
129 blacks = black_path_count(rb); in check()
131 WARN_ON_ONCE((!rb->rb_left || !rb->rb_right) && in check()
132 blacks != black_path_count(rb)); in check()
143 struct rb_node *rb; in check_augmented() local
146 for (rb = rb_first(&root); rb; rb = rb_next(rb)) { in check_augmented()
147 struct test_node *node = rb_entry(rb, struct test_node, rb); in check_augmented()