16 struct rb_node **p = &rblist->
entries.rb_node;
17 struct rb_node *parent = NULL, *new_node;
24 rc = rblist->
node_cmp(parent, new_entry);
33 new_node = rblist->
node_new(rblist, new_entry);
37 rb_link_node(new_node, parent, p);
38 rb_insert_color(new_node, &rblist->
entries);
46 rb_erase(rb_node, &rblist->
entries);
55 struct rb_node **p = &rblist->
entries.rb_node;
56 struct rb_node *parent = NULL, *new_node = NULL;
63 rc = rblist->
node_cmp(parent, entry);
73 new_node = rblist->
node_new(rblist, entry);
75 rb_link_node(new_node, parent, p);
76 rb_insert_color(new_node, &rblist->
entries);
106 struct rb_node *pos, *next = rb_first(&rblist->
entries);
117 if (rblist != NULL) {
125 struct rb_node *
node;
127 for (node = rb_first(&rblist->
entries); node; node = rb_next(node)) {
void rblist__delete(struct rblist *rblist)
int(* node_cmp)(struct rb_node *rbn, const void *entry)
void(* node_delete)(struct rblist *rblist, struct rb_node *rb_node)
struct rb_node * rblist__find(struct rblist *rblist, const void *entry)
struct rb_node * rblist__entry(const struct rblist *rblist, unsigned int idx)
struct rb_node * rblist__findnew(struct rblist *rblist, const void *entry)
static int entry(u64 ip, struct unwind_info *ui)
static struct rb_node * __rblist__findnew(struct rblist *rblist, const void *entry, bool create)
void rblist__exit(struct rblist *rblist)
struct rb_node *(* node_new)(struct rblist *rlist, const void *new_entry)
void rblist__init(struct rblist *rblist)
int rblist__add_node(struct rblist *rblist, const void *new_entry)
void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node)