libosmocore
1.5.1
Osmocom core library
|
Go to the documentation of this file.
115 #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
116 #define rb_color(r) ((r)->rb_parent_color & 1)
117 #define rb_is_red(r) (!rb_color(r))
118 #define rb_is_black(r) rb_color(r)
119 #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
120 #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
131 #define RB_ROOT { NULL, }
132 #define rb_entry(ptr, type, member) container_of(ptr, type, member)
134 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
135 #define RB_EMPTY_NODE(node) (rb_parent(node) == node)
136 #define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
154 node->rb_parent_color = (
unsigned long )parent;
155 node->rb_left =
node->rb_right = NULL;
static const char * color(int subsys)
Definition: logging.c:390
struct rb_node * rb_prev(const struct rb_node *)
Definition: rbtree.c:341
void rb_insert_color(struct rb_node *, struct rb_root *)
Definition: rbtree.c:74
Definition: linuxrbtree.h:110
struct rb_node * rb_left
Definition: linuxrbtree.h:105
struct rb_node * rb_first(const struct rb_root *)
Definition: rbtree.c:289
struct rb_root __attribute__
struct rb_node * rb_next(const struct rb_node *)
Definition: rbtree.c:313
unsigned long rb_parent_color
Definition: linuxrbtree.h:101
void rb_replace_node(struct rb_node *victim, struct rb_node *_new, struct rb_root *root)
Definition: rbtree.c:365
struct rb_node * rb_node
Definition: linuxrbtree.h:111
struct rb_node * rb_last(const struct rb_root *)
Definition: rbtree.c:301
struct rb_node * rb_right
Definition: linuxrbtree.h:104
static void rb_set_parent(struct rb_node *rb, struct rb_node *p)
Definition: linuxrbtree.h:122
Definition: linuxrbtree.h:100
void rb_erase(struct rb_node *, struct rb_root *)
Definition: rbtree.c:219
static void rb_set_color(struct rb_node *rb, int color)
Definition: linuxrbtree.h:126
static void rb_link_node(struct rb_node *node, struct rb_node *parent, struct rb_node **rb_link)
Definition: linuxrbtree.h:151