/linux-6.3-rc2/include/linux/ |
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 …]
|
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)); 77 RBNAME ## _propagate(struct rb_node *rb, struct rb_node *stop) \ 87 RBNAME ## _copy(struct rb_node *rb_old, struct rb_node *rb_new) \ 94 RBNAME ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \ 157 static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p) in rb_set_parent() 169 __rb_change_child(struct rb_node *old, struct rb_node *new, in __rb_change_child() 182 __rb_change_child_rcu(struct rb_node *old, struct rb_node *new, in __rb_change_child_rcu() [all …]
|
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;
|
/linux-6.3-rc2/tools/include/linux/ |
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 …]
|
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 …]
|
/linux-6.3-rc2/tools/lib/ |
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 …]
|
/linux-6.3-rc2/lib/ |
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 …]
|
/linux-6.3-rc2/tools/perf/util/ |
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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);
|
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()
|
A D | maps.c | 77 rb_erase_init(&map->rb_node, &maps->entries); in __maps__remove() 220 struct rb_node *next, *first; in maps__fixup_overlappings() 231 next = root->rb_node; in maps__fixup_overlappings() 248 next = rb_next(&pos->rb_node); in maps__fixup_overlappings() 269 rb_erase_init(&pos->rb_node, root); in maps__fixup_overlappings() 353 struct rb_node **p = &maps->entries.rb_node; in __maps__insert() 354 struct rb_node *parent = NULL; in __maps__insert() 367 rb_link_node(&map->rb_node, parent, p); in __maps__insert() 374 struct rb_node *p; in maps__find() 379 p = maps->entries.rb_node; in maps__find() [all …]
|
A D | comm.c | 14 struct rb_node rb_node; member 34 rb_erase(&cs->rb_node, &comm_str_root); in comm_str__put() 63 struct rb_node **p = &root->rb_node; in __comm_str__findnew() 64 struct rb_node *parent = NULL; in __comm_str__findnew() 70 iter = rb_entry(parent, struct comm_str, rb_node); in __comm_str__findnew() 91 rb_link_node(&new->rb_node, parent, p); in __comm_str__findnew() 92 rb_insert_color(&new->rb_node, root); in __comm_str__findnew()
|
/linux-6.3-rc2/fs/btrfs/ |
A D | misc.h | 65 struct rb_node rb_node; member 69 static inline struct rb_node *rb_simple_search(struct rb_root *root, u64 bytenr) in rb_simple_search() 71 struct rb_node *node = root->rb_node; in rb_simple_search() 75 entry = rb_entry(node, struct rb_simple_node, rb_node); in rb_simple_search() 96 static inline struct rb_node *rb_simple_search_first(struct rb_root *root, in rb_simple_search_first() 99 struct rb_node *node = root->rb_node, *ret = NULL; in rb_simple_search_first() 103 entry = rb_entry(node, struct rb_simple_node, rb_node); in rb_simple_search_first() 123 struct rb_node *node) in rb_simple_insert() 125 struct rb_node **p = &root->rb_node; in rb_simple_insert() 126 struct rb_node *parent = NULL; in rb_simple_insert() [all …]
|
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() 426 struct rb_node *rb_node; in __lookup_extent_mapping() local 431 if (!rb_node) { in __lookup_extent_mapping() 438 em = rb_entry(rb_node, struct extent_map, rb_node); in __lookup_extent_mapping() 516 rb_replace_node_cached(&cur->rb_node, &new->rb_node, &tree->map); in replace_extent_mapping() 524 struct rb_node *next; in next_extent_map() 534 struct rb_node *prev; in prev_extent_map() [all …]
|
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() 175 struct rb_node *node; in btrfs_add_ordered_extent() 344 rb_node); in btrfs_mark_ordered_io_finished() [all …]
|
/linux-6.3-rc2/Documentation/translations/zh_CN/core-api/ |
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 …]
|
/linux-6.3-rc2/tools/perf/tests/ |
A D | hists_output.c | 97 struct rb_node *node; in del_hist_entries() 109 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 131 struct rb_node *node; in test1() 167 he = rb_entry(node, struct hist_entry, rb_node); in test1() 173 he = rb_entry(node, struct hist_entry, rb_node); in test1() 179 he = rb_entry(node, struct hist_entry, rb_node); in test1() 185 he = rb_entry(node, struct hist_entry, rb_node); in test1() 233 struct rb_node *node; in test2() 289 struct rb_node *node; in test3() 363 struct rb_node *node; in test4() [all …]
|
/linux-6.3-rc2/arch/powerpc/kernel/ |
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 …]
|
/linux-6.3-rc2/arch/sh/kernel/ |
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 …]
|
/linux-6.3-rc2/net/bridge/ |
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 …]
|
/linux-6.3-rc2/fs/ext4/ |
A D | extents_status.c | 179 struct rb_node *node; in ext4_es_print_tree() 211 struct rb_node *node = root->rb_node; in __es_tree_search() 261 struct rb_node *node; in __es_find_extent_range() 540 struct rb_node *node; in ext4_es_try_to_merge_left() 564 struct rb_node *node; in ext4_es_try_to_merge_right() 757 struct rb_node **p = &tree->root.rb_node; in __es_insert_extent() 971 rb_node); in ext4_es_lookup_extent() 1134 struct rb_node *node = root->rb_node; in __pr_tree_search() 1234 rb_node); in get_rsvd() 1279 rb_node); in get_rsvd() [all …]
|
/linux-6.3-rc2/security/keys/ |
A D | proc.c | 64 static struct rb_node *key_serial_next(struct seq_file *p, struct rb_node *n) in key_serial_next() 81 struct rb_node *n = key_serial_tree.rb_node; in find_ge_key() 129 static inline key_serial_t key_node_serial(struct rb_node *n) in key_node_serial() 137 struct rb_node *n; in proc_keys_next() 155 struct rb_node *_p = v; in proc_keys_show() 252 static struct rb_node *__key_user_next(struct user_namespace *user_ns, struct rb_node *n) in __key_user_next() 263 static struct rb_node *key_user_next(struct user_namespace *user_ns, struct rb_node *n) in key_user_next() 270 struct rb_node *n = rb_first(r); in key_user_first() 277 struct rb_node *_p; in proc_key_users_start() 294 return key_user_next(seq_user_ns(p), (struct rb_node *)v); in proc_key_users_next() [all …]
|