Lines Matching defs:root
71 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
75 #define rb_insert_color(node, root) do { \
77 linux_root_RB_INSERT_COLOR((struct linux_root *)(root), \
80 #define rb_erase(node, root) \
81 linux_root_RB_REMOVE((struct linux_root *)(root), (node))
84 #define rb_first(root) RB_MIN(linux_root, (struct linux_root *)(root))
85 #define rb_last(root) RB_MAX(linux_root, (struct linux_root *)(root))
86 #define rb_first_cached(root) (root)->rb_leftmost
107 /* left -> right, right -> root */
133 struct rb_root *root)
136 RB_SWAP_CHILD((struct linux_root *)root, rb_parent(victim),
146 rb_insert_color_cached(struct rb_node *node, struct rb_root_cached *root,
150 linux_root_RB_INSERT_COLOR((struct linux_root *)&root->rb_root,
153 root->rb_leftmost = node;
157 rb_erase_cached(struct rb_node *node, struct rb_root_cached *root)
161 if (node == root->rb_leftmost)
162 retval = root->rb_leftmost = linux_root_RB_NEXT(node);
165 linux_root_RB_REMOVE((struct linux_root *)&root->rb_root, node);
171 struct rb_root_cached *root)
173 rb_replace_node(old, new, &root->rb_root);
174 if (root->rb_leftmost == old)
175 root->rb_leftmost = new;