110 #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
111 #define rb_color(r) ((r)->rb_parent_color & 1)
112 #define rb_is_red(r) (!rb_color(r))
113 #define rb_is_black(r) rb_color(r)
114 #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
115 #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
126 #define RB_ROOT { NULL, }
127 #define rb_entry(ptr, type, member) container_of(ptr, type, member)
129 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
130 #define RB_EMPTY_NODE(node) (rb_parent(node) == node)
131 #define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
149 node->rb_parent_color = (
unsigned long )parent;
150 node->rb_left =
node->rb_right = NULL;
static const char * color(int subsys)
Definition: logging.c:432
static void rb_set_parent(struct rb_node *rb, struct rb_node *p)
Definition: linuxrbtree.h:117
struct rb_node * rb_first(const struct rb_root *)
Definition: rbtree.c:284
static void rb_link_node(struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link)
Definition: linuxrbtree.h:146
static void rb_set_color(struct rb_node *rb, int color)
Definition: linuxrbtree.h:121
struct rb_node * rb_next(const struct rb_node *)
Definition: rbtree.c:308
void rb_insert_color(struct rb_node *, struct rb_root *)
Definition: rbtree.c:69
struct rb_node * rb_prev(const struct rb_node *)
Definition: rbtree.c:336
void rb_erase(struct rb_node *, struct rb_root *)
Definition: rbtree.c:214
struct rb_root __attribute__
void rb_replace_node(struct rb_node *victim, struct rb_node *_new, struct rb_root *root)
Definition: rbtree.c:360
struct rb_node * rb_last(const struct rb_root *)
Definition: rbtree.c:296
Definition: linuxrbtree.h:95
unsigned long rb_parent_color
Definition: linuxrbtree.h:96
struct rb_node * rb_left
Definition: linuxrbtree.h:100
struct rb_node * rb_right
Definition: linuxrbtree.h:99
Definition: linuxrbtree.h:105
struct rb_node * rb_node
Definition: linuxrbtree.h:106