Home
last modified time | relevance | path

Searched +full:root +full:- +full:node (Results 1 – 25 of 1004) sorted by relevance

12345678910>>...41

/freebsd/sys/compat/linuxkpi/common/src/
H A Dlinux_radix.c1 /*-
5 * Copyright (c) 2013-2020 Mellanox Technologies, Ltd.
38 #include <linux/radix-tree.h>
44 radix_max(struct radix_tree_root *root) in radix_max() argument
46 return ((1UL << (root->height * RADIX_TREE_MAP_SHIFT)) - 1UL); in radix_max()
56 radix_tree_clean_root_node(struct radix_tree_root *root) in radix_tree_clean_root_node() argument
58 /* Check if the root node should be freed */ in radix_tree_clean_root_node()
59 if (root->rnode->count == 0) { in radix_tree_clean_root_node()
60 free(root->rnode, M_RADIX); in radix_tree_clean_root_node()
61 root->rnode = NULL; in radix_tree_clean_root_node()
[all …]
/freebsd/contrib/wpa/src/utils/
H A Dxml-utils.c3 * Copyright (c) 2012-2013, Qualcomm Atheros, Inc.
12 #include "xml-utils.h"
16 xml_node_t *root, char *uri) in get_node_uri_iter() argument
19 xml_node_t *node; in get_node_uri_iter() local
26 node = root; in get_node_uri_iter()
27 xml_node_for_each_sibling(ctx, node) { in get_node_uri_iter()
28 xml_node_for_each_check(ctx, node); in get_node_uri_iter()
29 name = xml_node_get_localname(ctx, node); in get_node_uri_iter()
34 if (node == NULL) in get_node_uri_iter()
38 return get_node_uri_iter(ctx, xml_node_first_child(ctx, node), in get_node_uri_iter()
[all …]
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Drbtree.h1 /*-
71 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL) argument
72 #define RB_EMPTY_NODE(node) (RB_PARENT(node, __entry) == node) argument
73 #define RB_CLEAR_NODE(node) RB_SET_PARENT(node, node, __entr argument
75 rb_insert_color(node,root) global() argument
80 rb_erase(node,root) global() argument
82 rb_next(node) global() argument
83 rb_prev(node) global() argument
84 rb_first(root) global() argument
85 rb_last(root) global() argument
86 rb_first_cached(root) global() argument
89 __rb_deepest_left(struct rb_node * node) __rb_deepest_left() argument
103 rb_next_postorder(const struct rb_node * node) rb_next_postorder() argument
124 rb_link_node(struct rb_node * node,struct rb_node * parent,struct rb_node ** rb_link) rb_link_node() argument
133 rb_replace_node(struct rb_node * victim,struct rb_node * new,struct rb_root * root) rb_replace_node() argument
146 rb_insert_color_cached(struct rb_node * node,struct rb_root_cached * root,bool leftmost) rb_insert_color_cached() argument
157 rb_erase_cached(struct rb_node * node,struct rb_root_cached * root) rb_erase_cached() argument
171 rb_replace_node_cached(struct rb_node * old,struct rb_node * new,struct rb_root_cached * root) rb_replace_node_cached() argument
[all...]
H A Dinterval_tree_generic.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
43 type *node; \
46 node = rb_entry(rb, type, field); \
47 if (LAST(node) >= start && START(node) <= last) \
48 return (node); \
49 else if (START(node) > last) \
58 name##_iter_first(struct rb_root_cached *root, valtype start, valtype last) \
60 return (name##_iter_from(rb_first_cached(root), start, last)); \
65 name##_iter_next(type *node, valtype start, valtype last) \
[all …]
/freebsd/sys/dev/mlx5/mlx5_core/
H A Dmlx5_fs_core.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
317 static void del_hw_flow_table(struct fs_node *node);
318 static void del_hw_flow_group(struct fs_node *node);
319 static void del_hw_fte(struct fs_node *node);
320 static void del_sw_flow_table(struct fs_node *node);
321 static void del_sw_flow_group(struct fs_node *node);
322 static void del_sw_fte(struct fs_node *node);
323 static void del_sw_prio(struct fs_node *node);
324 static void del_sw_ns(struct fs_node *node);
[all …]
/freebsd/contrib/ldns/
H A Drbtree.c2 * rbtree.c -- generic red black tree
6 * Copyright (c) 2001-2008, NLnet Labs. All rights reserved.
49 /** Node colour black */
51 /** Node colour red */
54 /** the NULL node, global alloc */
65 static void ldns_rbtree_rotate_left(ldns_rbtree_t *rbtree, ldns_rbnode_t *node);
67 static void ldns_rbtree_rotate_right(ldns_rbtree_t *rbtree, ldns_rbnode_t *node);
68 /** Fixup node colours when insert happened */
69 static void ldns_rbtree_insert_fixup(ldns_rbtree_t *rbtree, ldns_rbnode_t *node);
70 /** Fixup node colours when delete happened */
[all …]
H A Dradix.c2 * radix.c -- generic radix tree
54 static int ldns_radix_array_space(ldns_radix_node_t* node, uint8_t byte);
55 static int ldns_radix_array_grow(ldns_radix_node_t* node, unsigned need);
67 static ldns_radix_node_t* ldns_radix_next_in_subtree(ldns_radix_node_t* node);
68 static ldns_radix_node_t* ldns_radix_prev_from_index(ldns_radix_node_t* node,
71 ldns_radix_node_t* node);
72 static ldns_radix_node_t* ldns_radix_last_in_subtree(ldns_radix_node_t* node);
73 static void ldns_radix_del_fix(ldns_radix_t* tree, ldns_radix_node_t* node);
74 static void ldns_radix_cleanup_onechild(ldns_radix_node_t* node);
75 static void ldns_radix_cleanup_leaf(ldns_radix_node_t* node);
[all …]
/freebsd/sbin/pfctl/
H A Dpfctl_qstats.c95 struct pf_altq_node *root = NULL, *node; in pfctl_show_altq() local
100 return (-1); in pfctl_show_altq()
103 if ((nodes = pfctl_update_qstats(dev, &root)) < 0) in pfctl_show_altq()
104 return (-1); in pfctl_show_altq()
108 for (node = root; node != NULL; node = node->next) { in pfctl_show_altq()
109 if (iface != NULL && strcmp(node->altq.ifname, iface)) in pfctl_show_altq()
115 pfctl_print_altq_node(dev, node, 0, opts); in pfctl_show_altq()
122 if ((nodes = pfctl_update_qstats(dev, &root)) == -1) in pfctl_show_altq()
123 return (-1); in pfctl_show_altq()
124 for (node = root; node != NULL; node = node->next) { in pfctl_show_altq()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/ctx_profile/tests/
H A DCtxInstrProfilingTest.cpp8 void SetUp() override { memset(&Root, 0, sizeof(ContextRoot)); } in SetUp()
12 ContextRoot Root; member in ContextTest
19 for (auto I = 0U; I < A->size(); ++I) in TEST()
20 EXPECT_EQ(A->pos()[I], static_cast<char>(0)); in TEST()
21 EXPECT_EQ(A->size(), 10U); in TEST()
26 EXPECT_EQ(A->size(), 1024U); in TEST()
27 EXPECT_EQ(A->next(), nullptr); in TEST()
29 auto *M1 = A->tryBumpAllocate(1020); in TEST()
31 auto *M2 = A->tryBumpAllocate(4); in TEST()
34 EXPECT_EQ(A->tryBumpAllocate(1), nullptr); in TEST()
[all …]
/freebsd/contrib/unbound/util/
H A Drbtree.c2 * rbtree.c -- generic red black tree
4 * Copyright (c) 2001-2007, NLnet Labs. All rights reserved.
47 /** Node colour black */
49 /** Node colour red */
52 /** the NULL node, global alloc */
62 static void rbtree_rotate_left(rbtree_type *rbtree, rbnode_type *node);
64 static void rbtree_rotate_right(rbtree_type *rbtree, rbnode_type *node);
65 /** Fixup node colours when insert happened */
66 static void rbtree_insert_fixup(rbtree_type *rbtree, rbnode_type *node);
67 /** Fixup node colours when delete happened */
[all …]
/freebsd/lib/libc/stdlib/
H A Dtsearch.344 .Fn twalk "const posix_tnode *root" "void (*action) (const posix_tnode *, VISIT, int)"
87 deletes a node from the specified binary search tree and returns
88 a pointer to the parent of the node to be deleted.
93 If the node to be deleted is the root of the binary search tree,
101 .Fa root
104 on each node.
108 is called with three arguments: a pointer to the current node,
111 specifying the traversal type, and a node level (where level
112 zero is the root of the tree).
116 function returns NULL if allocation of a new node fails (usually
[all …]
/freebsd/tests/sys/sys/
H A Dsplay_test.c1 /* $OpenBSD: splay-test.c,v 1.4 2008/04/13 00:22:17 djm Exp $ */
33 #include <atf-c.h>
35 struct node { struct
36 SPLAY_ENTRY(node) node;
40 static SPLAY_HEAD(tree, node) root; argument
43 compare(struct node *a, struct node *b) in compare()
45 if (a->key < b->key) return (-1); in compare()
46 else if (a->key > b->key) return (1); in compare()
50 SPLAY_PROTOTYPE(tree, node, node, compare);
52 SPLAY_GENERATE(tree, node, node, compare);
[all …]
H A Drb_test.c1 /* $OpenBSD: rb-test.c,v 1.4 2008/04/13 00:22:17 djm Exp $ */
34 #include <atf-c.h>
36 struct node { struct
37 RB_ENTRY(node) node;
41 static RB_HEAD(tree, node) root; argument
44 compare(struct node *a, struct node *b) in compare()
46 if (a->key < b->key) return (-1); in compare()
47 else if (a->key > b->key) return (1); in compare()
51 RB_PROTOTYPE(tree, node, node, compare);
53 RB_GENERATE(tree, node, node, compare);
[all …]
H A Darb_test.c1 /* $OpenBSD: rb-test.c,v 1.4 2008/04/13 00:22:17 djm Exp $ */
35 #include <atf-c.h>
37 struct node { struct
42 static ARB32_HEAD(tree, node) *root; in ARB32_HEAD() argument
45 compare(const struct node *a, const struct node *b)
47 if (a->key < b->key) return (-1);
48 else if (a->key > b->key) return (1);
52 ARB_PROTOTYPE(tree, node, next, compare);
54 ARB_GENERATE(tree, node, next, compare);
63 struct node *tmp, *ins; in ATF_TC_BODY()
[all …]
/freebsd/crypto/heimdal/lib/roken/
H A Dtsearch.c22 typedef struct node { struct
24 struct node *llink, *rlink; argument
36 * vrootp: address of tree root
52 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ in rk_tsearch()
56 &(*rootp)->llink : /* T3: follow left branch */ in rk_tsearch()
57 &(*rootp)->rlink; /* T4: follow right branch */ in rk_tsearch()
61 if (q != 0) { /* make new node */ in rk_tsearch()
62 *rootp = q; /* link new node to old */ in rk_tsearch()
64 q->key = __DECONST(void *, vkey); /* initialize new node */ in rk_tsearch()
65 q->llink = q->rlink = NULL; in rk_tsearch()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonCommonGEP.cpp1 //===- HexagonCommonGEP.cpp -----------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
54 static cl::opt<bool> OptSpeculate("commgep-speculate", cl::init(true),
57 static cl::opt<bool> OptEnableInv("commgep-inv", cl::init(true), cl::Hidden);
59 static cl::opt<bool> OptEnableConst("commgep-const", cl::init(true),
89 return F1->second < F2->second; in operator ()()
123 void getBlockTraversalOrder(BasicBlock *Root, ValueVect &Order);
129 BasicBlock *recalculatePlacement(GepNode *Node, NodeChildrenMap &NCM,
131 BasicBlock *recalculatePlacementRec(GepNode *Node, NodeChildrenMap &NCM,
[all …]
/freebsd/sys/contrib/ck/src/
H A Dck_barrier_combining.c2 * Copyright 2011-2015 Samy Al Bahra.
43 if (queue->head != NULL) { in ck_barrier_combining_queue_dequeue()
44 front = queue->head; in ck_barrier_combining_queue_dequeue()
45 queue->head = queue->head->next; in ck_barrier_combining_queue_dequeue()
58 tnode->parent = parent; in ck_barrier_combining_insert()
65 parent->k++; in ck_barrier_combining_insert()
80 node_value->next = NULL; in ck_barrier_combining_queue_enqueue()
81 if (queue->head == NULL) { in ck_barrier_combining_queue_enqueue()
82 queue->head = queue->tail = node_value; in ck_barrier_combining_queue_enqueue()
86 queue->tail->next = node_value; in ck_barrier_combining_queue_enqueue()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DGenericDomTreeConstruction.h1 //===- GenericDomTreeConstruction.h - Dominator Calculation ------*- C++ -*-==//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 /// Generic dominator tree construction - this file provides routines to
11 /// construct immediate dominator information for a flow-graph based on the
12 /// Semi-NCA algorithm described in this dissertation:
14 /// [1] Linear-Time Algorithms for Dominators and Related Problems
15 /// Loukas Georgiadis, Princeton University, November 2005, pp. 21-23:
18 /// Semi-NCA algorithm runs in O(n^2) worst-case time but usually slightly
19 /// faster than Simple Lengauer-Tarjan in practice.
[all …]
H A DSuffixTreeNode.h1 //===- llvm/ADT/SuffixTreeNode.h - Nodes for SuffixTrees --------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // Each node has either no children or at least two children, with the root
15 // a node N has a child M on unsigned integer k, then the mapping represented
17 // although similar to a trie is somewhat different: each node stores a full
20 // Each internal node contains a pointer to the internal node representing
22 // in \p Link. Each leaf node stores the start index of its respective
24 //===----------------------------------------------------------------------===//
32 /// A node in a suffix tree which represents a substring or suffix.
[all …]
/freebsd/sys/contrib/device-tree/Bindings/arm/hisilicon/
H A Dhisilicon.txt2 ----------------------------------------------------
4 Required root node properties:
5 - compatible = "hisilicon,hi3660";
8 Required root node properties:
9 - compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
12 Required root node properties:
13 - compatible = "hisilicon,hi3670";
16 Required root node properties:
17 - compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670";
20 Required root node properties:
[all …]
/freebsd/usr.sbin/makefs/
H A Dwalk.c4 * SPDX-License-Identifier: BSD-4-Clause
57 static void apply_specdir(const char *, NODE *, fsnode *, int);
58 static void apply_specentry(const char *, NODE *, fsnode *);
64 * walk_dir --
65 * build a tree of fsnodes from `root' and `dir', with a parent
66 * fsnode of `parent' (which may be NULL for the root of the tree).
72 walk_dir(const char *root, const char *dir, fsnode *parent, fsnode *join) in walk_dir() argument
83 assert(root != NULL); in walk_dir()
86 len = snprintf(path, sizeof(path), "%s/%s", root, dir); in walk_dir()
93 rp = path + strlen(root) + 1; in walk_dir()
[all …]
H A Dcd9660.c3 /*-
4 * SPDX-License-Identifier: BSD-2-Clause AND BSD-4-Clause
7 * Perez-Rathke and Ram Vedam. All rights reserved.
10 * Alan Perez-Rathke and Ram Vedam.
23 * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR
27 * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT,
166 * @returns struct cd9660node * Pointer to new node, or NULL on error
173 TAILQ_INIT(&temp->cn_children); in cd9660_allocate_cd9660node()
174 temp->parent = temp->dot_record = temp->dot_dot_record = NULL; in cd9660_allocate_cd9660node()
175 temp->ptnext = temp->ptprev = temp->ptlast = NULL; in cd9660_allocate_cd9660node()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DSuffixTree.cpp1 //===- llvm/Support/SuffixTree.cpp - Implement Suffix Tree ------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
22 assert(N && "Got a null node?"); in numElementsInSubstring()
24 if (Internal->isRoot()) in numElementsInSubstring()
26 return N->getEndIdx() - N->getStartIdx() + 1; in numElementsInSubstring()
32 Root = insertRoot(); in SuffixTree()
33 Active.Node = Root; in SuffixTree()
49 assert(Root && "Root node can't be nullptr!"); in SuffixTree()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DDDG.h1 //===- llvm/Analysis/DDG.h --------------------------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file defines the Data-Dependence Graph (DDG).
11 //===----------------------------------------------------------------------===//
33 /// Data Dependence Graph Node
35 /// 1. Single instruction node containing just one instruction.
36 /// 2. Multiple instruction node where two or more instructions from
37 /// the same basic block are merged into one node.
38 /// 3. Pi-block node which is a group of other DDG nodes that are part of a
[all …]
/freebsd/usr.sbin/autofs/
H A Dcommon.h1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
42 struct node { struct
43 TAILQ_ENTRY(node) n_next;
44 TAILQ_HEAD(nodehead, node) n_children;
45 struct node *n_parent; argument
75 struct node *node_new_root(void);
76 struct node *node_new(struct node *parent, char *key, char *options,
78 struct node *node_new_map(struct node *parent, char *key, char *options,
80 struct node *node_find(struct node *root, const char *mountpoint);
[all …]

12345678910>>...41