/openbmc/linux/include/linux/ |
H A D | rbtree.h | 44 extern struct rb_node *rb_next(const struct rb_node *); 45 extern struct rb_node *rb_prev(const struct rb_node *); 51 extern struct rb_node *rb_next_postorder(const struct rb_node *); 166 bool (*less)(struct rb_node *, const struct rb_node *)) in rb_add_cached() argument 168 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_cached() 196 bool (*less)(struct rb_node *, const struct rb_node *)) in rb_add() argument 198 struct rb_node **link = &tree->rb_node; in rb_add() 224 int (*cmp)(struct rb_node *, const struct rb_node *)) in rb_find_add() argument 226 struct rb_node **link = &tree->rb_node; in rb_find_add() 259 struct rb_node *node = tree->rb_node; in rb_find() [all …]
|
H A D | rbtree_augmented.h | 28 void (*propagate)(struct rb_node *node, struct rb_node *stop); 29 void (*copy)(struct rb_node *old, struct rb_node *new); 30 void (*rotate)(struct rb_node *old, struct rb_node *new); 34 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); 65 bool (*less)(struct rb_node *, const struct rb_node *), in rb_add_augmented_cached() argument 68 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_augmented_cached() 103 RBNAME ## _propagate(struct rb_node *rb, struct rb_node *stop) \ 113 RBNAME ## _copy(struct rb_node *rb_old, struct rb_node *rb_new) \ 120 RBNAME ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \ 195 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() [all …]
|
H A D | rbtree_types.h | 5 struct rb_node { struct 7 struct rb_node *rb_right; argument 8 struct rb_node *rb_left; argument 13 struct rb_node *rb_node; member 28 struct rb_node *rb_leftmost;
|
/openbmc/linux/tools/include/linux/ |
H A D | rbtree.h | 23 struct rb_node { struct 31 struct rb_node *rb_node; member 53 extern struct rb_node *rb_next(const struct rb_node *); 54 extern struct rb_node *rb_prev(const struct rb_node *); 60 extern struct rb_node *rb_next_postorder(const struct rb_node *); 181 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_cached() 209 struct rb_node **link = &tree->rb_node; in rb_add() 235 int (*cmp)(struct rb_node *, const struct rb_node *)) in rb_find_add() argument 237 struct rb_node **link = &tree->rb_node; in rb_find_add() 270 struct rb_node *node = tree->rb_node; in rb_find() [all …]
|
H A D | rbtree_augmented.h | 30 void (*propagate)(struct rb_node *node, struct rb_node *stop); 31 void (*copy)(struct rb_node *old, struct rb_node *new); 32 void (*rotate)(struct rb_node *old, struct rb_node *new); 36 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); 79 RBNAME ## _propagate(struct rb_node *rb, struct rb_node *stop) \ 89 RBNAME ## _copy(struct rb_node *rb_old, struct rb_node *rb_new) \ 96 RBNAME ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \ 159 static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) in rb_set_parent() 171 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() 180 WRITE_ONCE(root->rb_node, new); in __rb_change_child() [all …]
|
/openbmc/u-boot/include/linux/ |
H A D | rbtree.h | 24 struct rb_node { struct 26 struct rb_node *rb_right; argument 27 struct rb_node *rb_left; argument 32 struct rb_node *rb_node; member 41 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) 55 extern struct rb_node *rb_next(const struct rb_node *); 56 extern struct rb_node *rb_prev(const struct rb_node *); 62 extern struct rb_node *rb_next_postorder(const struct rb_node *); 65 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, 68 static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, in rb_link_node() [all …]
|
H A D | rbtree_augmented.h | 26 void (*propagate)(struct rb_node *node, struct rb_node *stop); 27 void (*copy)(struct rb_node *old, struct rb_node *new); 28 void (*rotate)(struct rb_node *old, struct rb_node *new); 32 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); 43 rbname ## _propagate(struct rb_node *rb, struct rb_node *stop) \ 55 rbname ## _copy(struct rb_node *rb_old, struct rb_node *rb_new) \ 62 rbname ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \ 86 static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) in rb_set_parent() 98 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() 107 root->rb_node = new; in __rb_change_child() [all …]
|
/openbmc/u-boot/lib/ |
H A D | rbtree.c | 42 static inline struct rb_node *rb_red_parent(struct rb_node *red) in rb_red_parent() 53 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() 64 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() 193 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() 355 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() 399 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() 410 struct rb_node *n; in rb_first() 434 struct rb_node *rb_next(const struct rb_node *node) in rb_next() 466 struct rb_node *rb_prev(const struct rb_node *node) in rb_prev() 495 void rb_replace_node(struct rb_node *victim, struct rb_node *new, in rb_replace_node() [all …]
|
/openbmc/linux/tools/lib/ |
H A D | rbtree.c | 64 static inline struct rb_node *rb_red_parent(struct rb_node *red) in rb_red_parent() 75 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() 86 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() 228 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() 411 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() 454 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() 464 struct rb_node *n; in rb_first() 486 struct rb_node *rb_next(const struct rb_node *node) in rb_next() 517 struct rb_node *rb_prev(const struct rb_node *node) in rb_prev() 545 void rb_replace_node(struct rb_node *victim, struct rb_node *new, in rb_replace_node() [all …]
|
/openbmc/linux/lib/ |
H A D | rbtree.c | 64 static inline struct rb_node *rb_red_parent(struct rb_node *red) in rb_red_parent() 75 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() 86 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() 228 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() 411 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() 457 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() 468 struct rb_node *n; in rb_first() 492 struct rb_node *rb_next(const struct rb_node *node) in rb_next() 524 struct rb_node *rb_prev(const struct rb_node *node) in rb_prev() 553 void rb_replace_node(struct rb_node *victim, struct rb_node *new, in rb_replace_node() [all …]
|
/openbmc/linux/tools/perf/util/ |
H A D | intlist.c | 23 rc = &node->rb_node; in intlist__node_new() 35 struct rb_node *rb_node) in intlist__node_delete() argument 37 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_delete() 42 static int intlist__node_cmp(struct rb_node *rb_node, const void *entry) in intlist__node_cmp() argument 45 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_cmp() 69 struct rb_node *rb_node; in __intlist__findnew() local 79 if (rb_node) in __intlist__findnew() 80 node = container_of(rb_node, struct int_node, rb_node); in __intlist__findnew() 143 struct rb_node *rb_node; in intlist__entry() local 146 if (rb_node) in intlist__entry() [all …]
|
H A D | strlist.c | 29 rc = &snode->rb_node; in strlist__node_new() 47 void strlist__node_delete(struct rblist *rblist, struct rb_node *rb_node) in strlist__node_delete() argument 50 struct str_node *snode = container_of(rb_node, struct str_node, rb_node); in strlist__node_delete() 55 static int strlist__node_cmp(struct rb_node *rb_node, const void *entry) in strlist__node_cmp() argument 58 struct str_node *snode = container_of(rb_node, struct str_node, rb_node); in strlist__node_cmp() 103 struct rb_node *rb_node = rblist__find(&slist->rblist, entry); in strlist__find() local 105 if (rb_node) in strlist__find() 106 snode = container_of(rb_node, struct str_node, rb_node); in strlist__find() 201 struct rb_node *rb_node; in strlist__entry() local 204 if (rb_node) in strlist__entry() [all …]
|
H A D | rblist.c | 15 struct rb_node **p = &rblist->entries.rb_root.rb_node; in rblist__add_node() 16 struct rb_node *parent = NULL, *new_node; in rblist__add_node() 46 void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node) in rblist__remove_node() argument 48 rb_erase_cached(rb_node, &rblist->entries); in rblist__remove_node() 50 rblist->node_delete(rblist, rb_node); in rblist__remove_node() 53 static struct rb_node *__rblist__findnew(struct rblist *rblist, in __rblist__findnew() 57 struct rb_node **p = &rblist->entries.rb_root.rb_node; in __rblist__findnew() 58 struct rb_node *parent = NULL, *new_node = NULL; in __rblist__findnew() 90 struct rb_node *rblist__find(struct rblist *rblist, const void *entry) in rblist__find() 112 struct rb_node *pos, *next = rb_first_cached(&rblist->entries); in rblist__exit() [all …]
|
H A D | maps.c | 38 struct rb_node **p = &maps__entries(maps)->rb_node; in __maps__insert() 39 struct rb_node *parent = NULL; in __maps__insert() 115 rb_erase_init(&rb_node->rb_node, maps__entries(maps)); in __maps__remove() 116 map__put(rb_node->map); in __maps__remove() 117 free(rb_node); in __maps__remove() 122 struct map_rb_node *rb_node; in maps__remove() local 291 next = root->rb_node; in maps__fixup_overlappings() 390 struct map_rb_node *rb_node; in maps__clone() local 425 return rb_node; in maps__find_node() 432 struct rb_node *p; in maps__find() [all …]
|
H A D | rblist.h | 26 int (*node_cmp)(struct rb_node *rbn, const void *entry); 27 struct rb_node *(*node_new)(struct rblist *rlist, const void *new_entry); 28 void (*node_delete)(struct rblist *rblist, struct rb_node *rb_node); 35 void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node); 36 struct rb_node *rblist__find(struct rblist *rblist, const void *entry); 37 struct rb_node *rblist__findnew(struct rblist *rblist, const void *entry); 38 struct rb_node *rblist__entry(const struct rblist *rblist, unsigned int idx);
|
H A D | rb_resort.h | 57 struct rb_node rb_node; \ 60 static void __name##_sorted__init_entry(struct rb_node *nd, \ 63 static int __name##_sorted__cmp(struct rb_node *nda, struct rb_node *ndb) \ 66 a = rb_entry(nda, struct __name##_sorted_entry, rb_node); \ 67 b = rb_entry(ndb, struct __name##_sorted_entry, rb_node); \ 77 struct rb_node *sorted_nd) \ 79 struct rb_node **p = &sorted->entries.rb_node, *parent = NULL; \ 94 struct rb_node *nd; \ 99 __name##_sorted__insert(sorted, &snd->rb_node); \ 120 static void __name##_sorted__init_entry(struct rb_node *nd, \ [all …]
|
H A D | mem2node.c | 12 struct rb_node rb_node; member 20 struct rb_node **p = &root->rb_node; in phys_entry__insert() 21 struct rb_node *parent = NULL; in phys_entry__insert() 26 e = rb_entry(parent, struct phys_entry, rb_node); in phys_entry__insert() 34 rb_link_node(&entry->rb_node, parent, p); in phys_entry__insert() 35 rb_insert_color(&entry->rb_node, root); in phys_entry__insert() 44 RB_CLEAR_NODE(&entry->rb_node); in phys_entry__init() 121 struct rb_node **p, *parent = NULL; in mem2node__node() 124 p = &map->root.rb_node; in mem2node__node() 127 entry = rb_entry(parent, struct phys_entry, rb_node); in mem2node__node()
|
/openbmc/linux/fs/btrfs/ |
H A D | misc.h | 63 struct rb_node rb_node; member 67 static inline struct rb_node *rb_simple_search(struct rb_root *root, u64 bytenr) in rb_simple_search() 69 struct rb_node *node = root->rb_node; in rb_simple_search() 73 entry = rb_entry(node, struct rb_simple_node, rb_node); in rb_simple_search() 94 static inline struct rb_node *rb_simple_search_first(struct rb_root *root, in rb_simple_search_first() 97 struct rb_node *node = root->rb_node, *ret = NULL; in rb_simple_search_first() 101 entry = rb_entry(node, struct rb_simple_node, rb_node); in rb_simple_search_first() 121 struct rb_node *node) in rb_simple_insert() 123 struct rb_node **p = &root->rb_node; in rb_simple_insert() 124 struct rb_node *parent = NULL; in rb_simple_insert() [all …]
|
H A D | extent_map.c | 52 RB_CLEAR_NODE(&em->rb_node); in alloc_extent_map() 86 struct rb_node **p = &root->rb_root.rb_node; in tree_insert() 138 struct rb_node *n = root->rb_node; in __tree_search() 234 struct rb_node *rb; in try_merge_map() 428 struct rb_node *rb_node; in __lookup_extent_mapping() local 433 if (!rb_node) { in __lookup_extent_mapping() 440 em = rb_entry(rb_node, struct extent_map, rb_node); in __lookup_extent_mapping() 518 rb_replace_node_cached(&cur->rb_node, &new->rb_node, &tree->map); in replace_extent_mapping() 526 struct rb_node *next; in next_extent_map() 536 struct rb_node *prev; in prev_extent_map() [all …]
|
H A D | ordered-data.c | 39 struct rb_node **p = &root->rb_node; in tree_insert() 67 struct rb_node *n = root->rb_node; in __tree_search() 69 struct rb_node *test; in __tree_search() 93 rb_node); in __tree_search() 101 rb_node); in __tree_search() 107 rb_node); in __tree_search() 132 struct rb_node *ret; in tree_search() 137 rb_node); in tree_search() 215 struct rb_node *node; in insert_ordered_extent() 442 rb_node); in btrfs_mark_ordered_io_finished() [all …]
|
/openbmc/linux/Documentation/translations/zh_CN/core-api/ |
H A D | rbtree.rst | 50 每个rb_node结构体的实例嵌入在它管理的数据结构中,因此不需要靠指针来分离rb_node和它 60 struct rb_node node; 64 当处理一个指向内嵌rb_node结构体的指针时,包住rb_node的结构体可用标准的container_of() 81 struct rb_node *node = root->rb_node; 112 struct rb_node **new = &(root->rb_node), *parent = NULL; 153 void rb_replace_node(struct rb_node *old, struct rb_node *new, 167 struct rb_node *rb_next(struct rb_node *node); 168 struct rb_node *rb_prev(struct rb_node *node); 174 迭代器函数返回一个指向被嵌入的rb_node结构体的指针,由此,包住rb_node的结构体可用 269 if (!root->rb_node) [all …]
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | eeh_cache.c | 41 struct rb_node rb_node; member 56 struct rb_node *n = pci_io_addr_cache_root.rb_root.rb_node; in __eeh_addr_cache_get_device() 60 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in __eeh_addr_cache_get_device() 100 struct rb_node *n; in eeh_addr_cache_print() 106 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in eeh_addr_cache_print() 121 struct rb_node **p = &pci_io_addr_cache_root.rb_root.rb_node; in eeh_addr_cache_insert() 122 struct rb_node *parent = NULL; in eeh_addr_cache_insert() 154 rb_link_node(&piar->rb_node, parent, p); in eeh_addr_cache_insert() 215 struct rb_node *n; in __eeh_addr_cache_rmv_dev() 221 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in __eeh_addr_cache_rmv_dev() [all …]
|
/openbmc/linux/tools/perf/tests/ |
H A D | hists_output.c | 100 struct rb_node *node; in del_hist_entries() 112 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 144 struct rb_node *node; in test1() 180 he = rb_entry(node, struct hist_entry, rb_node); in test1() 186 he = rb_entry(node, struct hist_entry, rb_node); in test1() 192 he = rb_entry(node, struct hist_entry, rb_node); in test1() 198 he = rb_entry(node, struct hist_entry, rb_node); in test1() 246 struct rb_node *node; in test2() 302 struct rb_node *node; in test3() 376 struct rb_node *node; in test4() [all …]
|
/openbmc/linux/arch/sh/kernel/ |
H A D | dwarf.c | 305 struct rb_node **rb_node = &cie_root.rb_node; in dwarf_lookup_cie() local 320 while (*rb_node) { in dwarf_lookup_cie() 332 rb_node = &(*rb_node)->rb_left; in dwarf_lookup_cie() 334 rb_node = &(*rb_node)->rb_right; in dwarf_lookup_cie() 349 struct rb_node **rb_node = &fde_root.rb_node; in dwarf_lookup_fde() local 366 rb_node = &(*rb_node)->rb_left; in dwarf_lookup_fde() 372 rb_node = &(*rb_node)->rb_right; in dwarf_lookup_fde() 738 struct rb_node **rb_node = &cie_root.rb_node; in dwarf_parse_cie() local 739 struct rb_node *parent = *rb_node; in dwarf_parse_cie() 869 struct rb_node **rb_node = &fde_root.rb_node; in dwarf_parse_fde() local [all …]
|
/openbmc/linux/net/bridge/ |
H A D | br_multicast_eht.c | 47 struct rb_node *node = pg->eht_host_tree.rb_node; in br_multicast_eht_host_lookup() 54 rb_node); in br_multicast_eht_host_lookup() 83 struct rb_node *node = eht_set->entry_tree.rb_node; in br_multicast_eht_set_entry_lookup() 90 rb_node); in br_multicast_eht_set_entry_lookup() 107 struct rb_node *node = pg->eht_set_tree.rb_node; in br_multicast_eht_set_lookup() 114 rb_node); in br_multicast_eht_set_lookup() 186 rb_node); in br_multicast_del_eht_set() 203 rb_node); in br_multicast_eht_clean_sets() 252 rb_node); in __eht_lookup_create_host() 297 rb_node); in __eht_lookup_create_set_entry() [all …]
|