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)) struct rb_node * rb_next(const struct rb_node *)
Definition: rbtree.c:308
unsigned long rb_parent_color
Definition: linuxrbtree.h:96
static void rb_link_node(struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link)
Definition: linuxrbtree.h:146
static const char * color(int subsys)
Definition: logging.c:420
struct rb_node * rb_left
Definition: linuxrbtree.h:100
Definition: linuxrbtree.h:104
struct rb_root __attribute__
static void rb_set_color(struct rb_node *rb, int color)
Definition: linuxrbtree.h:121
struct rb_node * rb_node
Definition: linuxrbtree.h:106
void rb_insert_color(struct rb_node *, struct rb_root *)
Definition: rbtree.c:69
void rb_replace_node(struct rb_node *victim, struct rb_node *_new, struct rb_root *root)
Definition: rbtree.c:360
struct rb_node * rb_first(const struct rb_root *)
Definition: rbtree.c:284
struct rb_node * rb_last(const struct rb_root *)
Definition: rbtree.c:296
static void rb_set_parent(struct rb_node *rb, struct rb_node *p)
Definition: linuxrbtree.h:117
Definition: linuxrbtree.h:94
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_node * rb_right
Definition: linuxrbtree.h:99