summaryrefslogtreecommitdiff
path: root/lib/interval_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/interval_tree.c')
-rw-r--r--lib/interval_tree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/interval_tree.c b/lib/interval_tree.c
new file mode 100644
index 000000000000..e6eb406f2d65
--- /dev/null
+++ b/lib/interval_tree.c
@@ -0,0 +1,10 @@
+#include <linux/init.h>
+#include <linux/interval_tree.h>
+#include <linux/interval_tree_generic.h>
+
+#define START(node) ((node)->start)
+#define LAST(node) ((node)->last)
+
+INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
+ unsigned long, __subtree_last,
+ START, LAST,, interval_tree)