Matthew Wilcox | 1366c37 | 2016-03-17 14:21:45 -0700 | [diff] [blame] | 1 | #include <linux/gfp.h> |
| 2 | #include <linux/types.h> |
| 3 | #include <linux/radix-tree.h> |
| 4 | #include <linux/rcupdate.h> |
| 5 | |
| 6 | struct item { |
| 7 | unsigned long index; |
| 8 | }; |
| 9 | |
| 10 | struct item *item_create(unsigned long index); |
| 11 | int __item_insert(struct radix_tree_root *root, struct item *item); |
| 12 | int item_insert(struct radix_tree_root *root, unsigned long index); |
| 13 | int item_delete(struct radix_tree_root *root, unsigned long index); |
| 14 | struct item *item_lookup(struct radix_tree_root *root, unsigned long index); |
| 15 | |
| 16 | void item_check_present(struct radix_tree_root *root, unsigned long index); |
| 17 | void item_check_absent(struct radix_tree_root *root, unsigned long index); |
| 18 | void item_gang_check_present(struct radix_tree_root *root, |
| 19 | unsigned long start, unsigned long nr, |
| 20 | int chunk, int hop); |
| 21 | void item_full_scan(struct radix_tree_root *root, unsigned long start, |
| 22 | unsigned long nr, int chunk); |
| 23 | void item_kill_tree(struct radix_tree_root *root); |
| 24 | |
| 25 | void tag_check(void); |
| 26 | |
| 27 | struct item * |
| 28 | item_tag_set(struct radix_tree_root *root, unsigned long index, int tag); |
| 29 | struct item * |
| 30 | item_tag_clear(struct radix_tree_root *root, unsigned long index, int tag); |
| 31 | int item_tag_get(struct radix_tree_root *root, unsigned long index, int tag); |
| 32 | void tree_verify_min_height(struct radix_tree_root *root, int maxindex); |
| 33 | void verify_tag_consistency(struct radix_tree_root *root, unsigned int tag); |
| 34 | |
| 35 | extern int nr_allocated; |
| 36 | |
| 37 | /* Normally private parts of lib/radix-tree.c */ |
| 38 | void *indirect_to_ptr(void *ptr); |
| 39 | int root_tag_get(struct radix_tree_root *root, unsigned int tag); |
| 40 | unsigned long radix_tree_maxindex(unsigned int height); |