Home
last modified time | relevance | path

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

12345678910>>...41

/OK3568_Linux_fs/kernel/lib/
H A Dradix-tree.c1 // SPDX-License-Identifier: GPL-2.0-or-later
24 #include <linux/radix-tree.h>
31 * Radix tree node cache.
36 * The radix tree is variable-height, so an insert operation not only has
43 * of RADIX_TREE_MAX_PATH size to be created, with only the root node shared.
46 #define RADIX_TREE_PRELOAD_SIZE (RADIX_TREE_MAX_PATH * 2 - 1)
52 #define IDR_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(int) - 1)
55 #define IDR_PRELOAD_SIZE (IDR_MAX_PATH * 2 - 1)
58 * Per-cpu pool of preloaded nodes
80 return parent ? slot - parent->slots : 0; in get_slot_offset()
[all …]
H A Drbtree_test.c1 // SPDX-License-Identifier: GPL-2.0-only
14 __param(int, nnodes, 100, "Number of nodes in the rb-tree");
15 __param(int, perf_loops, 1000, "Number of iterations modifying the rb-tree");
16 __param(int, check_loops, 100, "Number of iterations modifying and verifying the rb-tree");
27 static struct rb_root_cached root = RB_ROOT_CACHED; variable
32 static void insert(struct test_node *node, struct rb_root_cached *root) in insert() argument
34 struct rb_node **new = &root->rb_root.rb_node, *parent = NULL; in insert()
35 u32 key = node->key; in insert()
39 if (key < rb_entry(parent, struct test_node, rb)->key) in insert()
40 new = &parent->rb_left; in insert()
[all …]
H A Drbtree.c1 // SPDX-License-Identifier: GPL-2.0-or-later
16 * red-black trees properties: https://en.wikipedia.org/wiki/Rbtree
18 * 1) A node is either red or black
19 * 2) The root is black
21 * 4) Both children of every red node are black
22 * 5) Every simple path from root to leaves contains the same number
26 * consecutive red nodes in a path and every red node is therefore followed by
42 * These two requirements will allow lockless iteration of the tree -- not
47 * and that it will indeed complete -- does not get stuck in a loop.
61 rb->__rb_parent_color |= RB_BLACK; in rb_set_black()
[all …]
H A Dbootconfig.c1 // SPDX-License-Identifier: GPL-2.0
19 * Extra Boot Config (XBC) is given as tree-structured ascii text of
20 * key-value pairs on memory.
21 * xbc_parse() parses the text to build a simple tree. Each tree node is
22 * simply a key word or a value. A key node may have a next key node or/and
23 * a child node (both key and value). A value node may have a next value
24 * node (for array).
40 xbc_err_pos = (int)(p - xbc_data); in xbc_parse_error()
42 return -EINVAL; in xbc_parse_error()
46 * xbc_root_node() - Get the root node of extended boot config
[all …]
/OK3568_Linux_fs/kernel/scripts/gdb/linux/
H A Drbtree.py1 # SPDX-License-Identifier: GPL-2.0
13 def rb_first(root): argument
14 if root.type == rb_root_type.get_type():
15 node = root.address.cast(rb_root_type.get_type().pointer())
16 elif root.type != rb_root_type.get_type().pointer():
17 raise gdb.GdbError("Must be struct rb_root not {}".format(root.type))
19 node = root['rb_node']
20 if node == 0:
23 while node['rb_left']:
24 node = node['rb_left']
[all …]
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/arm/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/lib/gcc/arm-none-linux-gnueabihf/10.3.1/plugin/include/
H A Dtyped-splay-tree.h1 /* A typesafe wrapper around libiberty's splay-tree.h.
2 Copyright (C) 2015-2020 Free Software Foundation, Inc.
23 /* Typesafe wrapper around libiberty's splay-tree.h. */
92 static value_type node_to_value (splay_tree_node node);
94 /* The root of the tree. */
95 splay_tree_node root; variable
100 /* The deallocate-key function. NULL if no cleanup is necessary. */
103 /* The deallocate-value function. NULL if no cleanup is necessary. */
115 root = NULL; in typed_splay_tree()
127 splay_tree_delete_helper (root); in ~typed_splay_tree()
[all …]
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/10.3.1/plugin/include/
H A Dtyped-splay-tree.h1 /* A typesafe wrapper around libiberty's splay-tree.h.
2 Copyright (C) 2015-2020 Free Software Foundation, Inc.
23 /* Typesafe wrapper around libiberty's splay-tree.h. */
92 static value_type node_to_value (splay_tree_node node);
94 /* The root of the tree. */
95 splay_tree_node root; variable
100 /* The deallocate-key function. NULL if no cleanup is necessary. */
103 /* The deallocate-value function. NULL if no cleanup is necessary. */
115 root = NULL; in typed_splay_tree()
127 splay_tree_delete_helper (root); in ~typed_splay_tree()
[all …]
/OK3568_Linux_fs/kernel/fs/btrfs/
H A Ddelayed-inode.c1 // SPDX-License-Identifier: GPL-2.0
11 #include "delayed-inode.h"
12 #include "disk-io.h"
32 return -ENOMEM; in btrfs_delayed_inode_init()
43 struct btrfs_root *root, u64 inode_id) in btrfs_init_delayed_node() argument
45 delayed_node->root = root; in btrfs_init_delayed_node()
46 delayed_node->inode_id = inode_id; in btrfs_init_delayed_node()
47 refcount_set(&delayed_node->refs, 0); in btrfs_init_delayed_node()
48 delayed_node->ins_root = RB_ROOT_CACHED; in btrfs_init_delayed_node()
49 delayed_node->del_root = RB_ROOT_CACHED; in btrfs_init_delayed_node()
[all …]
H A Drelocation.c1 // SPDX-License-Identifier: GPL-2.0
12 #include <linux/error-injection.h>
14 #include "disk-io.h"
19 #include "async-thread.h"
20 #include "free-space-cache.h"
21 #include "inode-map.h"
23 #include "print-tree.h"
24 #include "delalloc-space.h"
25 #include "block-group.h"
40 * ------------------------------------------------------------------
[all …]
/OK3568_Linux_fs/kernel/include/linux/
H A Drbtree_latch.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Latched RB-trees
7 * Since RB-trees have non-atomic modifications they're not immediately suited
8 * for RCU/lockless queries. Even though we made RB-tree lookups non-fatal for
11 * The simplest solution is a seqlock + RB-tree, this will allow lockless
17 * employing the latch technique -- see @raw_write_seqcount_latch -- to
18 * implement a latched RB-tree which does allow for unconditional lookups by
26 * Therefore, this does require a lockless RB-tree iteration to be non-fatal;
28 * condition -- not seeing partial stores -- because the latch thing isolates
41 struct rb_node node[2]; member
[all …]
H A Drbtree.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
14 See Documentation/core-api/rbtree.rst for documentation and samples.
35 #define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3))
40 #define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL) argument
43 #define RB_EMPTY_NODE(node) \ argument
44 ((node)->__rb_parent_color == (unsigned long)(node))
45 #define RB_CLEAR_NODE(node) \ argument
46 ((node)->__rb_parent_color = (unsigned long)(node))
59 /* Postorder iteration - always visit the parent after its children */
63 /* Fast replacement of a single node without remove/rebalance/add/rebalance */
[all …]
H A Drbtree_augmented.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
20 * Please note - only struct rb_augment_callbacks and the prototypes for
24 * See Documentation/core-api/rbtree.rst for documentation and samples.
28 void (*propagate)(struct rb_node *node, struct rb_node *stop);
33 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root,
40 * leading to the inserted node, then call rb_link_node() as usual and
47 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument
50 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented()
54 rb_insert_augmented_cached(struct rb_node *node, in rb_insert_augmented_cached() argument
55 struct rb_root_cached *root, bool newleft, in rb_insert_augmented_cached() argument
[all …]
H A Dinterval_tree_generic.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
18 * ITSUBTREE: name of ITTYPE field within ITSTRUCT holding last-in-subtree
19 * ITSTART(n): start endpoint of ITSTRUCT node n
20 * ITLAST(n): last endpoint of ITSTRUCT node n
24 * Note - before using this, please consider if generic version
38 ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, \
39 struct rb_root_cached *root) \
41 struct rb_node **link = &root->rb_root.rb_node, *rb_parent = NULL; \
42 ITTYPE start = ITSTART(node), last = ITLAST(node); \
49 if (parent->ITSUBTREE < last) \
[all …]
/OK3568_Linux_fs/u-boot/lib/
H A Drbtree.c7 * SPDX-License-Identifier: GPL-2.0+
19 * red-black trees properties: http://en.wikipedia.org/wiki/Rbtree
21 * 1) A node is either red or black
22 * 2) The root is black
24 * 4) Both children of every red node are black
25 * 5) Every simple path from root to leaves contains the same number
29 * consecutive red nodes in a path and every red node is therefore followed by
40 rb->__rb_parent_color |= RB_BLACK; in rb_set_black()
45 return (struct rb_node *)red->__rb_parent_color; in rb_red_parent()
50 * - old's parent and color get assigned to new
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlx5/core/
H A Dfs_core.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
263 static void del_hw_flow_table(struct fs_node *node);
264 static void del_hw_flow_group(struct fs_node *node);
265 static void del_hw_fte(struct fs_node *node);
266 static void del_sw_flow_table(struct fs_node *node);
267 static void del_sw_flow_group(struct fs_node *node);
268 static void del_sw_fte(struct fs_node *node);
269 static void del_sw_prio(struct fs_node *node);
270 static void del_sw_ns(struct fs_node *node);
[all …]
/OK3568_Linux_fs/kernel/tools/lib/
H A Drbtree.c1 // SPDX-License-Identifier: GPL-2.0-or-later
16 * red-black trees properties: https://en.wikipedia.org/wiki/Rbtree
18 * 1) A node is either red or black
19 * 2) The root is black
21 * 4) Both children of every red node are black
22 * 5) Every simple path from root to leaves contains the same number
26 * consecutive red nodes in a path and every red node is therefore followed by
42 * These two requirements will allow lockless iteration of the tree -- not
47 * and that it will indeed complete -- does not get stuck in a loop.
61 rb->__rb_parent_color |= RB_BLACK; in rb_set_black()
[all …]
/OK3568_Linux_fs/kernel/tools/perf/util/
H A Dstrfilter.c1 // SPDX-License-Identifier: GPL-2.0
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()
33 strfilter_node__delete(filter->root); in strfilter__delete()
56 if (*(p - 1) == '\\' || (*p == '!' && *(p - 1) == '[')) { in get_token()
[all …]
/OK3568_Linux_fs/kernel/tools/include/linux/
H A Drbtree.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
14 See Documentation/core-api/rbtree.rst for documentation and samples.
34 #define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3))
39 #define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL) argument
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))
58 /* Postorder iteration - always visit the parent after its children */
62 /* Fast replacement of a single node without remove/rebalance/add/rebalance */
[all …]
H A Drbtree_augmented.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
22 * Please note - only struct rb_augment_callbacks and the prototypes for
26 * See Documentation/core-api/rbtree.rst for documentation and samples.
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,
42 * leading to the inserted node, then call rb_link_node() as usual and
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
57 struct rb_root_cached *root, bool newleft, in rb_insert_augmented_cached() argument
[all …]
/OK3568_Linux_fs/external/rknpu2/examples/3rdparty/opencv/opencv-linux-armhf/share/OpenCV/haarcascades/
H A Dhaarcascade_licence_plate_rus_16stages.xml3 <!-- Automatically converted from haarcascade2, window size = 64x16 -->
4 <haarcascade_pltzzz64x16_16STG type_id="opencv-haar-classifier">
9 <!-- stage 0 -->
12 <!-- tree 0 -->
14 <!-- root node -->
18 32 2 8 6 -1.</_>
22 <threshold>1.6915600746870041e-002</threshold>
23 <left_val>-9.5547717809677124e-001</left_val>
24 <right_val>8.9129137992858887e-001</right_val></_></_>
26 <!-- tree 1 -->
[all …]
/OK3568_Linux_fs/external/rknpu2/examples/3rdparty/opencv/opencv-linux-aarch64/share/OpenCV/haarcascades/
H A Dhaarcascade_licence_plate_rus_16stages.xml3 <!-- Automatically converted from haarcascade2, window size = 64x16 -->
4 <haarcascade_pltzzz64x16_16STG type_id="opencv-haar-classifier">
9 <!-- stage 0 -->
12 <!-- tree 0 -->
14 <!-- root node -->
18 32 2 8 6 -1.</_>
22 <threshold>1.6915600746870041e-002</threshold>
23 <left_val>-9.5547717809677124e-001</left_val>
24 <right_val>8.9129137992858887e-001</right_val></_></_>
26 <!-- tree 1 -->
[all …]
/OK3568_Linux_fs/external/rknpu2/examples/3rdparty/opencv/OpenCV-android-sdk/sdk/etc/haarcascades/
H A Dhaarcascade_licence_plate_rus_16stages.xml3 <!-- Automatically converted from haarcascade2, window size = 64x16 -->
4 <haarcascade_pltzzz64x16_16STG type_id="opencv-haar-classifier">
9 <!-- stage 0 -->
12 <!-- tree 0 -->
14 <!-- root node -->
18 32 2 8 6 -1.</_>
22 <threshold>1.6915600746870041e-002</threshold>
23 <left_val>-9.5547717809677124e-001</left_val>
24 <right_val>8.9129137992858887e-001</right_val></_></_>
26 <!-- tree 1 -->
[all …]
/OK3568_Linux_fs/kernel/Documentation/core-api/
H A Drbtree.rst2 Red-black Trees (rbtree) in Linux
9 What are red-black trees, and what are they for?
10 ------------------------------------------------
12 Red-black trees are a type of self-balancing binary search tree, used for
19 Red-black trees are similar to AVL trees, but provide faster real-time bounded
26 There are a number of red-black trees in use in the kernel.
29 The high-resolution timer code uses an rbtree to organize outstanding
31 red-black tree. Virtual memory areas (VMAs) are tracked with red-black
38 Linux Weekly News article on red-black trees
41 Wikipedia entry on red-black trees
[all …]
/OK3568_Linux_fs/kernel/fs/nfs/blocklayout/
H A Dextent_tree.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2014-2016 Christoph Hellwig.
13 ext_node(struct rb_node *node) in ext_node() argument
15 return rb_entry(node, struct pnfs_block_extent, be_node); in ext_node()
19 ext_tree_first(struct rb_root *root) in ext_tree_first() argument
21 struct rb_node *node = rb_first(root); in ext_tree_first() local
22 return node ? ext_node(node) : NULL; in ext_tree_first()
28 struct rb_node *node = rb_prev(&be->be_node); in ext_tree_prev() local
29 return node ? ext_node(node) : NULL; in ext_tree_prev()
35 struct rb_node *node = rb_next(&be->be_node); in ext_tree_next() local
[all …]
/OK3568_Linux_fs/u-boot/include/linux/
H A Drbtree_augmented.h7 * SPDX-License-Identifier: GPL-2.0+
19 * Please note - only struct rb_augment_callbacks and the prototypes for
27 void (*propagate)(struct rb_node *node, struct rb_node *stop);
32 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root,
35 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument
38 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented()
47 rbstruct *node = rb_entry(rb, rbstruct, rbfield); \
48 rbtype augmented = rbcompute(node); \
49 if (node->rbaugmented == augmented) \
51 node->rbaugmented = augmented; \
[all …]

12345678910>>...41