summaryrefslogtreecommitdiff
path: root/sys/external/bsd/drm2/include/linux
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2021-12-19 11:17:19 +0000
committerriastradh <riastradh@NetBSD.org>2021-12-19 11:17:19 +0000
commitf1742d646ae0466edd8bb83d2b11f56cbdaaa606 (patch)
treecfe09586ca16538c61c5bcd49c4fe6037c86391d /sys/external/bsd/drm2/include/linux
parent835153755258224256c02beed35d3db7bed37982 (diff)
Provide and use an rb_next2 which takes a pointer to the tree as well
Easier for us to implement. Author: Maya Rashish <maya@NetBSD.org> Committer: Taylor R Campbell <riastradh@NetBSD.org>
Diffstat (limited to 'sys/external/bsd/drm2/include/linux')
-rw-r--r--sys/external/bsd/drm2/include/linux/rbtree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/external/bsd/drm2/include/linux/rbtree.h b/sys/external/bsd/drm2/include/linux/rbtree.h
index f965741f021..347e8788bf0 100644
--- a/sys/external/bsd/drm2/include/linux/rbtree.h
+++ b/sys/external/bsd/drm2/include/linux/rbtree.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rbtree.h,v 1.10 2021/12/19 11:16:32 riastradh Exp $ */
+/* $NetBSD: rbtree.h,v 1.11 2021/12/19 11:17:19 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -69,6 +69,11 @@ rb_first(struct rb_root *root)
}
static inline struct rb_node *
+rb_next2(struct rb_root *root, struct rb_node *rb) {
+ return RB_TREE_NEXT(&root->rbr_tree, rb);
+}
+
+static inline struct rb_node *
rb_last(struct rb_root *root)
{
char *vnode = RB_TREE_MAX(&root->rbr_tree);