| /tools/net/sunrpc/xdrgen/generators/ |
| D | typedef.py | 18 def emit_typedef_declaration(environment: Environment, node: _XdrDeclaration) -> None: 20 if node.name not in public_apis: 22 if isinstance(node, _XdrBasic): 23 template = get_jinja2_template(environment, "declaration", node.template) 26 name=node.name, 27 type=kernel_c_type(node.spec), 28 classifier=node.spec.c_classifier, 31 elif isinstance(node, _XdrVariableLengthString): 32 template = get_jinja2_template(environment, "declaration", node.template) 33 print(template.render(name=node.name)) [all …]
|
| D | union.py | 15 def emit_union_declaration(environment: Environment, node: _XdrUnion) -> None: 17 if node.name in public_apis: 19 print(template.render(name=node.name)) 23 environment: Environment, node: _XdrDeclaration 26 assert isinstance(node, _XdrBasic) 30 name=node.name, 31 type=node.spec.type_name, 32 classifier=node.spec.c_classifier, 38 environment: Environment, node: _XdrDeclaration 41 if isinstance(node.arm, _XdrVoid): [all …]
|
| D | enum.py | 18 def emit_declaration(self, node: _XdrEnum) -> None: 20 if node.name in public_apis: 22 print(template.render(name=node.name)) 24 def emit_definition(self, node: _XdrEnum) -> None: 27 print(template.render(name=node.name)) 30 for enumerator in node.enumerators: 34 print(template.render(name=node.name)) 36 def emit_decoder(self, node: _XdrEnum) -> None: 39 print(template.render(name=node.name)) 41 def emit_encoder(self, node: _XdrEnum) -> None: [all …]
|
| D | pointer.py | 18 def emit_pointer_declaration(environment: Environment, node: _XdrPointer) -> None: 20 if node.name in public_apis: 22 print(template.render(name=node.name)) 81 def emit_pointer_definition(environment: Environment, node: _XdrPointer) -> None: 84 print(template.render(name=node.name)) 86 for field in node.fields[0:-1]: 90 print(template.render(name=node.name)) 161 def emit_pointer_decoder(environment: Environment, node: _XdrPointer) -> None: 164 print(template.render(name=node.name)) 166 for field in node.fields[0:-1]: [all …]
|
| D | struct.py | 18 def emit_struct_declaration(environment: Environment, node: _XdrStruct) -> None: 20 if node.name in public_apis: 22 print(template.render(name=node.name)) 81 def emit_struct_definition(environment: Environment, node: _XdrStruct) -> None: 84 print(template.render(name=node.name)) 86 for field in node.fields: 90 print(template.render(name=node.name)) 161 def emit_struct_decoder(environment: Environment, node: _XdrStruct) -> None: 164 print(template.render(name=node.name)) 166 for field in node.fields: [all …]
|
| D | program.py | 122 def emit_definition(self, node: _RpcProgram) -> None: 124 raw_name = node.name 127 for version in node.versions: 130 def emit_declaration(self, node: _RpcProgram) -> None: 132 raw_name = node.name 135 for version in node.versions: 138 def emit_decoder(self, node: _RpcProgram) -> None: 140 raw_name = node.name 144 for version in node.versions: 149 for version in node.versions: [all …]
|
| /tools/include/linux/ |
| D | rbtree.h | 42 #define RB_EMPTY_NODE(node) \ argument 43 ((node)->__rb_parent_color == (unsigned long)(node)) 44 #define RB_CLEAR_NODE(node) \ argument 45 ((node)->__rb_parent_color = (unsigned long)(node)) 66 static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, in rb_link_node() argument 69 node->__rb_parent_color = (unsigned long)parent; in rb_link_node() 70 node->rb_left = node->rb_right = NULL; in rb_link_node() 72 *rb_link = node; in rb_link_node() 129 static inline void rb_insert_color_cached(struct rb_node *node, in rb_insert_color_cached() argument 134 root->rb_leftmost = node; in rb_insert_color_cached() [all …]
|
| D | interval_tree_generic.h | 38 ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, \ 42 ITTYPE start = ITSTART(node), last = ITLAST(node); \ 59 node->ITSUBTREE = last; \ 60 rb_link_node(&node->ITRB, rb_parent, link); \ 61 rb_insert_augmented_cached(&node->ITRB, root, \ 65 ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, \ 68 rb_erase_augmented_cached(&node->ITRB, root, &ITPREFIX ## _augment); \ 81 ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \ 88 if (node->ITRB.rb_left) { \ 89 ITSTRUCT *left = rb_entry(node->ITRB.rb_left, \ [all …]
|
| D | rbtree_augmented.h | 30 void (*propagate)(struct rb_node *node, struct rb_node *stop); 35 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 49 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument 52 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 56 rb_insert_augmented_cached(struct rb_node *node, in rb_insert_augmented_cached() argument 61 root->rb_leftmost = node; in rb_insert_augmented_cached() 62 rb_insert_augmented(node, &root->rb_root, augment); in rb_insert_augmented_cached() 82 RBSTRUCT *node = rb_entry(rb, RBSTRUCT, RBFIELD); \ 83 if (RBCOMPUTE(node, true)) \ 85 rb = rb_parent(&node->RBFIELD); \ [all …]
|
| /tools/lib/ |
| D | rbtree.c | 85 __rb_insert(struct rb_node *node, struct rb_root *root, in __rb_insert() argument 88 struct rb_node *parent = rb_red_parent(node), *gparent, *tmp; in __rb_insert() 100 rb_set_parent_color(node, NULL, RB_BLACK); in __rb_insert() 133 node = gparent; in __rb_insert() 134 parent = rb_parent(node); in __rb_insert() 135 rb_set_parent_color(node, parent, RB_RED); in __rb_insert() 140 if (node == tmp) { in __rb_insert() 154 tmp = node->rb_left; in __rb_insert() 156 WRITE_ONCE(node->rb_left, parent); in __rb_insert() 160 rb_set_parent_color(parent, node, RB_RED); in __rb_insert() [all …]
|
| /tools/perf/tests/ |
| D | hists_output.c | 100 struct rb_node *node; in del_hist_entries() local 110 node = rb_first_cached(root_out); in del_hist_entries() 112 he = rb_entry(node, struct hist_entry, rb_node); in del_hist_entries() 113 rb_erase_cached(node, root_out); in del_hist_entries() 144 struct rb_node *node; in test1() local 179 node = rb_first_cached(root); in test1() 180 he = rb_entry(node, struct hist_entry, rb_node); in test1() 185 node = rb_next(node); in test1() 186 he = rb_entry(node, struct hist_entry, rb_node); in test1() 191 node = rb_next(node); in test1() [all …]
|
| /tools/perf/util/ |
| D | strfilter.c | 19 static void strfilter_node__delete(struct strfilter_node *node) in strfilter_node__delete() argument 21 if (node) { in strfilter_node__delete() 22 if (node->p && !is_operator(*node->p)) in strfilter_node__delete() 23 zfree((char **)&node->p); in strfilter_node__delete() 24 strfilter_node__delete(node->l); in strfilter_node__delete() 25 strfilter_node__delete(node->r); in strfilter_node__delete() 26 free(node); in strfilter_node__delete() 70 struct strfilter_node *node = zalloc(sizeof(*node)); in strfilter_node__alloc() local 72 if (node) { in strfilter_node__alloc() 73 node->p = op; in strfilter_node__alloc() [all …]
|
| D | intlist.c | 18 struct int_node *node = malloc(sizeof(*node)); in intlist__node_new() local 20 if (node != NULL) { in intlist__node_new() 21 node->i = i; in intlist__node_new() 22 node->priv = NULL; in intlist__node_new() 23 rc = &node->rb_node; in intlist__node_new() 37 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_delete() local 39 int_node__delete(node); in intlist__node_delete() 45 struct int_node *node = container_of(rb_node, struct int_node, rb_node); in intlist__node_cmp() local 47 if (node->i > i) in intlist__node_cmp() 49 else if (node->i < i) in intlist__node_cmp() [all …]
|
| D | block-range.c | 19 struct block_range *entry = rb_entry(rb, struct block_range, node); in block_range__debug() 37 entry = rb_entry(parent, struct block_range, node); in block_range__find() 50 static inline void rb_link_left_of_node(struct rb_node *left, struct rb_node *node) in rb_link_left_of_node() argument 52 struct rb_node **p = &node->rb_left; in rb_link_left_of_node() 54 node = *p; in rb_link_left_of_node() 55 p = &node->rb_right; in rb_link_left_of_node() 57 rb_link_node(left, node, p); in rb_link_left_of_node() 60 static inline void rb_link_right_of_node(struct rb_node *right, struct rb_node *node) in rb_link_right_of_node() argument 62 struct rb_node **p = &node->rb_right; in rb_link_right_of_node() 64 node = *p; in rb_link_right_of_node() [all …]
|
| D | callchain.c | 420 __sort_chain_flat(struct rb_root *rb_root, struct callchain_node *node, in __sort_chain_flat() argument 426 n = rb_first(&node->rb_root_in); in __sort_chain_flat() 434 if (node->hit && node->hit >= min_hit) in __sort_chain_flat() 435 rb_insert_callchain(rb_root, node, CHAIN_FLAT); in __sort_chain_flat() 447 __sort_chain_flat(rb_root, &root->node, min_hit); in sort_chain_flat() 450 static void __sort_chain_graph_abs(struct callchain_node *node, in __sort_chain_graph_abs() argument 456 node->rb_root = RB_ROOT; in __sort_chain_graph_abs() 457 n = rb_first(&node->rb_root_in); in __sort_chain_graph_abs() 465 rb_insert_callchain(&node->rb_root, child, in __sort_chain_graph_abs() 474 __sort_chain_graph_abs(&chain_root->node, min_hit); in sort_chain_graph_abs() [all …]
|
| D | callchain.h | 77 struct callchain_node node; member 159 struct list_head node; member 173 INIT_LIST_HEAD(&root->node.val); in callchain_init() 174 INIT_LIST_HEAD(&root->node.parent_val); in callchain_init() 176 root->node.parent = NULL; in callchain_init() 177 root->node.hit = 0; in callchain_init() 178 root->node.children_hit = 0; in callchain_init() 179 root->node.rb_root_in = RB_ROOT; in callchain_init() 183 static inline u64 callchain_cumul_hits(struct callchain_node *node) in callchain_cumul_hits() argument 185 return node->hit + node->children_hit; in callchain_cumul_hits() [all …]
|
| /tools/testing/selftests/dt/ |
| D | test_unprobed_devices.sh | 32 for node in $(find ${PDT} -type d); do 33 [ ! -f "${node}"/compatible ] && continue 35 if [[ -e "${node}"/status ]]; then 36 status=$(tr -d '\000' < "${node}"/status) 39 disabled_nodes_regex="${disabled_nodes_regex}|${node}" 41 disabled_nodes_regex="${node}" 49 echo "${node}" | grep -q -E "${disabled_nodes_regex}" && continue 52 echo "${node}" | sed -e 's|\/proc\/device-tree||' 70 for node in ${nodes_compatible}; do 71 if ! echo "${nodes_dev_bound}" | grep -E -q "(^| )${node}( |\$)"; then [all …]
|
| /tools/testing/selftests/bpf/progs/ |
| D | rbtree_fail.c | 12 struct bpf_rb_node node; member 17 private(A) struct bpf_rb_root groot __contains(node_data, node); 18 private(A) struct bpf_rb_root groot2 __contains(node_data, node); 25 node_a = container_of(a, struct node_data, node); in less() 26 node_b = container_of(b, struct node_data, node); in less() 41 bpf_rbtree_add(&groot, &n->node, less); in rbtree_api_nolock_add() 56 bpf_rbtree_add(&groot, &n->node, less); in rbtree_api_nolock_remove() 59 bpf_rbtree_remove(&groot, &n->node); in rbtree_api_nolock_remove() 89 bpf_rbtree_add(&groot, &n->node, less); in rbtree_api_remove_unadded_node() 92 res = bpf_rbtree_remove(&groot, &n->node); in rbtree_api_remove_unadded_node() [all …]
|
| D | rbtree.c | 13 struct bpf_rb_node node; member 18 struct bpf_rb_root root __contains(node_data, node); 31 private(A) struct bpf_rb_root groot __contains(node_data, node); 32 private(A) struct bpf_rb_root groot_array[2] __contains(node_data, node); 33 private(A) struct bpf_rb_root groot_array_one[1] __contains(node_data, node); 41 node_a = container_of(a, struct node_data, node); in less() 42 node_b = container_of(b, struct node_data, node); in less() 65 bpf_rbtree_add(&groot, &n->node, less); in __add_three() 66 bpf_rbtree_add(&groot, &m->node, less); in __add_three() 75 bpf_rbtree_add(&groot, &n->node, less); in __add_three() [all …]
|
| D | rbtree_btf_fail__add_wrong_type.c | 13 struct bpf_rb_node node; member 18 struct bpf_rb_node node; member 27 node_a = container_of(a, struct node_data2, node); in less2() 28 node_b = container_of(b, struct node_data2, node); in less2() 35 private(A) struct bpf_rb_root groot __contains(node_data, node); 47 bpf_rbtree_add(&groot, &n->node, less2); in rbtree_api_add__add_wrong_type()
|
| /tools/net/sunrpc/xdrgen/subcmds/ |
| D | source.py | 30 def emit_source_decoder(node: _XdrAst, language: str, peer: str) -> None: 32 if isinstance(node, _XdrEnum): 34 elif isinstance(node, _XdrPointer): 36 elif isinstance(node, _XdrTypedef): 38 elif isinstance(node, _XdrStruct): 40 elif isinstance(node, _XdrUnion): 42 elif isinstance(node, _RpcProgram): 46 gen.emit_decoder(node) 49 def emit_source_encoder(node: _XdrAst, language: str, peer: str) -> None: 51 if isinstance(node, _XdrEnum): [all …]
|
| /tools/testing/selftests/rseq/ |
| D | basic_percpu_ops_test.c | 171 struct percpu_list_node *node, in this_cpu_list_push() argument 183 newval = (intptr_t)node; in this_cpu_list_push() 185 node->next = (struct percpu_list_node *)expect; in this_cpu_list_push() 235 struct percpu_list_node *node; in __percpu_list_pop() local 237 node = list->c[cpu].head; in __percpu_list_pop() 238 if (!node) in __percpu_list_pop() 240 list->c[cpu].head = node->next; in __percpu_list_pop() 241 return node; in __percpu_list_pop() 256 struct percpu_list_node *node; in test_percpu_list_thread() local 258 node = this_cpu_list_pop(list, NULL); in test_percpu_list_thread() [all …]
|
| /tools/testing/selftests/net/ |
| D | reuseport_bpf_numa.c | 197 int epfd, node; in test() local 205 for (node = 0; node < len; ++node) { in test() 207 ev.data.fd = rcv_fd[node]; in test() 208 if (epoll_ctl(epfd, EPOLL_CTL_ADD, rcv_fd[node], &ev)) in test() 213 for (node = 0; node < len; ++node) { in test() 214 if (!numa_bitmask_isbitset(numa_nodes_ptr, node)) in test() 216 send_from_node(node, family, proto); in test() 217 receive_on_node(rcv_fd, len, epfd, node, proto); in test() 221 for (node = len - 1; node >= 0; --node) { in test() 222 if (!numa_bitmask_isbitset(numa_nodes_ptr, node)) in test() [all …]
|
| /tools/perf/ |
| D | builtin-kmem.c | 72 struct rb_node node; member 90 struct rb_node **node = &root_alloc_stat.rb_node; in insert_alloc_stat() local 94 while (*node) { in insert_alloc_stat() 95 parent = *node; in insert_alloc_stat() 96 data = rb_entry(*node, struct alloc_stat, node); in insert_alloc_stat() 99 node = &(*node)->rb_right; in insert_alloc_stat() 101 node = &(*node)->rb_left; in insert_alloc_stat() 122 rb_link_node(&data->node, parent, node); in insert_alloc_stat() 123 rb_insert_color(&data->node, &root_alloc_stat); in insert_alloc_stat() 135 struct rb_node **node = &root_caller_stat.rb_node; in insert_caller_stat() local [all …]
|
| /tools/bootconfig/ |
| D | main.c | 19 static int xbc_show_value(struct xbc_node *node, bool semicolon) in xbc_show_value() argument 26 xbc_array_for_each_value(node, val) { in xbc_show_value() 31 printf("%c%s%c%s", q, val, q, xbc_node_is_array(node) ? ", " : eol); in xbc_show_value() 39 struct xbc_node *node, *cnode = NULL, *vnode; in xbc_show_compact_tree() local 42 node = xbc_root_node(); in xbc_show_compact_tree() 43 while (node && xbc_node_is_key(node)) { in xbc_show_compact_tree() 47 cnode = xbc_node_get_child(node); in xbc_show_compact_tree() 63 printf("%s.", xbc_node_get_data(node)); in xbc_show_compact_tree() 64 node = cnode; in xbc_show_compact_tree() 68 printf("%s {\n", xbc_node_get_data(node)); in xbc_show_compact_tree() [all …]
|