94 #ifndef _LINUX_RBTREE_H 95 #define _LINUX_RBTREE_H 113 #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3)) 114 #define rb_color(r) ((r)->rb_parent_color & 1) 115 #define rb_is_red(r) (!rb_color(r)) 116 #define rb_is_black(r) rb_color(r) 117 #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0) 118 #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0) 129 #define RB_ROOT (struct rb_root) { NULL, } 130 #define rb_entry(ptr, type, member) container_of(ptr, type, member) 132 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) 133 #define RB_EMPTY_NODE(node) (rb_parent(node) != node) 134 #define RB_CLEAR_NODE(node) (rb_set_parent(node, node)) static void rb_set_color(struct rb_node *rb, ULONG_PTR color)
static void rb_link_node(struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link)
struct rb_node * rb_next(struct rb_node *)
void rb_insert(struct rb_root *root, struct rb_node *node, int(*cmp)(struct rb_node *, struct rb_node *))
struct rb_node * rb_last(struct rb_root *)
#define cmp(status, error)
struct rb_node * rb_prev(struct rb_node *)
struct rb_node * rb_first(struct rb_root *)
void rb_erase(struct rb_node *, struct rb_root *)
void rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root)
ULONG_PTR rb_parent_color
struct rb_root __attribute__
static void rb_set_parent(struct rb_node *rb, struct rb_node *p)
void rb_insert_color(struct rb_node *, struct rb_root *)
struct rb_node * rb_right