interval_tree.h 757 B

123456789101112131415161718192021222324252627
  1. #ifndef _LINUX_INTERVAL_TREE_H
  2. #define _LINUX_INTERVAL_TREE_H
  3. #include <linux/rbtree.h>
  4. struct interval_tree_node {
  5. struct rb_node rb;
  6. unsigned long start; /* Start of interval */
  7. unsigned long last; /* Last location _in_ interval */
  8. unsigned long __subtree_last;
  9. };
  10. extern void
  11. interval_tree_insert(struct interval_tree_node *node, struct rb_root *root);
  12. extern void
  13. interval_tree_remove(struct interval_tree_node *node, struct rb_root *root);
  14. extern struct interval_tree_node *
  15. interval_tree_iter_first(struct rb_root *root,
  16. unsigned long start, unsigned long last);
  17. extern struct interval_tree_node *
  18. interval_tree_iter_next(struct interval_tree_node *node,
  19. unsigned long start, unsigned long last);
  20. #endif /* _LINUX_INTERVAL_TREE_H */