Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux Rename struct rb_root_ca...
details: https://anonhg.NetBSD.org/src/rev/87be7c9f9fde
branches: trunk
changeset: 1028080:87be7c9f9fde
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:48:30 2021 +0000
description:
Rename struct rb_root_cached field to match Linux as needed.
diffstat:
sys/external/bsd/drm2/include/linux/interval_tree.h | 26 +++++++++++---------
sys/external/bsd/drm2/include/linux/rbtree.h | 6 ++--
2 files changed, 17 insertions(+), 15 deletions(-)
diffs (99 lines):
diff -r 07f4172049d6 -r 87be7c9f9fde sys/external/bsd/drm2/include/linux/interval_tree.h
--- a/sys/external/bsd/drm2/include/linux/interval_tree.h Sun Dec 19 01:48:22 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/interval_tree.h Sun Dec 19 01:48:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interval_tree.h,v 1.10 2021/12/19 01:44:33 riastradh Exp $ */
+/* $NetBSD: interval_tree.h,v 1.11 2021/12/19 01:48:30 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -77,35 +77,37 @@
};
static inline void
-interval_tree_init(struct rb_root *root)
+interval_tree_init(struct rb_root_cached *root)
{
- rb_tree_init(&root->rbr_tree, &interval_tree_ops);
+ rb_tree_init(&root->rb_root.rbr_tree, &interval_tree_ops);
}
static inline void
-interval_tree_insert(struct interval_tree_node *node, struct rb_root *root)
+interval_tree_insert(struct interval_tree_node *node,
+ struct rb_root_cached *root)
{
struct interval_tree_node *collision __diagused;
- collision = rb_tree_insert_node(&root->rbr_tree, node);
+ collision = rb_tree_insert_node(&root->rb_root.rbr_tree, node);
KASSERT(collision == node);
}
static inline void
-interval_tree_remove(struct interval_tree_node *node, struct rb_root *root)
+interval_tree_remove(struct interval_tree_node *node,
+ struct rb_root_cached *root)
{
- rb_tree_remove_node(&root->rbr_tree, node);
+ rb_tree_remove_node(&root->rb_root.rbr_tree, node);
}
static inline struct interval_tree_node *
-interval_tree_iter_first(struct rb_root *root, unsigned long start,
+interval_tree_iter_first(struct rb_root_cached *root, unsigned long start,
unsigned long last)
{
struct interval_tree_node *node;
- node = rb_tree_find_node_geq(&root->rbr_tree, &start);
+ node = rb_tree_find_node_geq(&root->rb_root.rbr_tree, &start);
if (node == NULL)
return NULL;
if (last < node->start)
@@ -121,13 +123,13 @@
* uses.
*/
static inline struct interval_tree_node *
-interval_tree_iter_next(struct rb_root *root, struct interval_tree_node *node,
- unsigned long start, unsigned long last)
+interval_tree_iter_next(struct rb_root_cached *root,
+ struct interval_tree_node *node, unsigned long start, unsigned long last)
{
struct interval_tree_node *next;
KASSERT(node != NULL);
- next = rb_tree_iterate(&root->rbr_tree, node, RB_DIR_RIGHT);
+ next = rb_tree_iterate(&root->rb_root.rbr_tree, node, RB_DIR_RIGHT);
if (next == NULL)
return NULL;
if (last < next->start)
diff -r 07f4172049d6 -r 87be7c9f9fde sys/external/bsd/drm2/include/linux/rbtree.h
--- a/sys/external/bsd/drm2/include/linux/rbtree.h Sun Dec 19 01:48:22 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/rbtree.h Sun Dec 19 01:48:30 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rbtree.h,v 1.7 2021/12/19 01:44:33 riastradh Exp $ */
+/* $NetBSD: rbtree.h,v 1.8 2021/12/19 01:48:30 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
};
struct rb_root_cached {
- struct rb_root rbrc_root;
+ struct rb_root rb_root; /* Linux API name */
};
static inline bool
@@ -61,7 +61,7 @@
static inline void
rb_erase_cached(struct rb_node *rbnode, struct rb_root_cached *root)
{
- rb_erase(rbnode, &root->rbrc_root);
+ rb_erase(rbnode, &root->rb_root);
}
/*
Home |
Main Index |
Thread Index |
Old Index