xref: /openbmc/linux/lib/interval_tree.c (revision a88cc108f6f39e56577793f66ac69eb0e18ae099)
1fff3fd8aSMichel Lespinasse #include <linux/init.h>
2fff3fd8aSMichel Lespinasse #include <linux/interval_tree.h>
39826a516SMichel Lespinasse #include <linux/interval_tree_generic.h>
4*a88cc108SChris Wilson #include <linux/module.h>
5fff3fd8aSMichel Lespinasse 
69826a516SMichel Lespinasse #define START(node) ((node)->start)
79826a516SMichel Lespinasse #define LAST(node)  ((node)->last)
8fff3fd8aSMichel Lespinasse 
99826a516SMichel Lespinasse INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
109826a516SMichel Lespinasse 		     unsigned long, __subtree_last,
119826a516SMichel Lespinasse 		     START, LAST,, interval_tree)
12*a88cc108SChris Wilson 
13*a88cc108SChris Wilson EXPORT_SYMBOL_GPL(interval_tree_insert);
14*a88cc108SChris Wilson EXPORT_SYMBOL_GPL(interval_tree_remove);
15*a88cc108SChris Wilson EXPORT_SYMBOL_GPL(interval_tree_iter_first);
16*a88cc108SChris Wilson EXPORT_SYMBOL_GPL(interval_tree_iter_next);
17