Home
last modified time | relevance | path

Searched refs:rb_node (Results 1 – 25 of 462) sorted by relevance

12345678910>>...19

/linux/include/linux/
H A Drbtree.h44 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 Drbtree_augmented.h28 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 Drbtree_types.h5 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/tools/include/linux/
H A Drbtree.h23 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 Drbtree_augmented.h30 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/tools/lib/
H A Drbtree.c64 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/lib/
H A Drbtree.c64 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/tools/perf/util/
H A Dintlist.c23 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 Dstrlist.c29 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 Drblist.c15 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 Drb_resort.h57 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 Drblist.h26 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 Dmem2node.c12 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()
H A Dintlist.h11 struct rb_node rb_node; member
48 struct rb_node *rn = rb_first_cached(&ilist->rblist.entries); in intlist__first()
49 return rn ? rb_entry(rn, struct int_node, rb_node) : NULL; in intlist__first()
53 struct rb_node *rn; in intlist__next()
56 rn = rb_next(&in->rb_node); in intlist__next()
57 return rn ? rb_entry(rn, struct int_node, rb_node) : NULL; in intlist__next()
H A Dstrlist.h11 struct rb_node rb_node; member
60 struct rb_node *rn = rb_first_cached(&slist->rblist.entries); in strlist__first()
61 return rn ? rb_entry(rn, struct str_node, rb_node) : NULL; in strlist__first()
65 struct rb_node *rn; in strlist__next()
68 rn = rb_next(&sn->rb_node); in strlist__next()
69 return rn ? rb_entry(rn, struct str_node, rb_node) : NULL; in strlist__next()
/linux/Documentation/translations/zh_CN/core-api/
H A Drbtree.rst50 每个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/fs/btrfs/
H A Dmisc.h65 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 …]
H A Dextent_map.c90 struct rb_node **p = &root->rb_root.rb_node; in tree_insert()
142 struct rb_node *n = root->rb_node; in __tree_search()
239 struct rb_node *rb; in try_merge_map()
409 struct rb_node *rb_node; in __lookup_extent_mapping() local
414 if (!rb_node) { in __lookup_extent_mapping()
421 em = rb_entry(rb_node, struct extent_map, rb_node); in __lookup_extent_mapping()
503 rb_replace_node_cached(&cur->rb_node, &new->rb_node, &tree->map); in replace_extent_mapping()
511 struct rb_node *next; in next_extent_map()
521 struct rb_node *prev; in prev_extent_map()
664 struct rb_node *node; in drop_all_extent_maps_fast()
[all …]
H A Dordered-data.c38 struct rb_node **p = &root->rb_node; in tree_insert()
66 struct rb_node *n = root->rb_node; in __tree_search()
68 struct rb_node *test; in __tree_search()
92 rb_node); in __tree_search()
100 rb_node); in __tree_search()
106 rb_node); in __tree_search()
130 struct rb_node *ret; in ordered_tree_search()
135 rb_node); in ordered_tree_search()
213 struct rb_node *node; in insert_ordered_extent()
477 rb_node); in btrfs_mark_ordered_io_finished()
[all …]
/linux/tools/perf/tests/
H A Dhists_output.c100 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 …]
/linux/arch/powerpc/kernel/
H A Deeh_cache.c41 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/arch/sh/kernel/
H A Ddwarf.c305 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/net/bridge/
H A Dbr_multicast_eht.c47 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/security/keys/
H A Dproc.c64 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 …]
/linux/fs/ext4/
H A Dextents_status.c182 struct rb_node *node; in ext4_es_print_tree()
214 struct rb_node *node = root->rb_node; in __es_tree_search()
264 struct rb_node *node; in __es_find_extent_range()
571 struct rb_node *node; in ext4_es_try_to_merge_left()
595 struct rb_node *node; in ext4_es_try_to_merge_right()
789 struct rb_node **p = &tree->root.rb_node; in __es_insert_extent()
1036 rb_node); in ext4_es_lookup_extent()
1199 struct rb_node *node = root->rb_node; in __pr_tree_search()
1299 rb_node); in get_rsvd()
1344 rb_node); in get_rsvd()
[all …]

12345678910>>...19