]> git.itanic.dy.fi Git - scan-pagemap/blob - bintree.h
Analyzer: Print detailed kpageflag statistics
[scan-pagemap] / bintree.h
1 #ifndef _BINTREE_H
2 #define _BINTREE_H
3
4 struct bintree {
5         struct bintree *left, *right;
6 };
7
8 struct bintree_ops {
9         int (*compare)(struct bintree *a, struct bintree *b);
10         void (*callback)(struct bintree *tree, struct bintree_ops *ops);
11 };
12
13 struct bintree *bintree_add(struct bintree *tree, struct bintree *new,
14                         struct bintree_ops *ops);
15 struct bintree *bintree_find(struct bintree *tree, struct bintree *new,
16                         struct bintree_ops *ops);
17 int bintree_walk(struct bintree *tree, struct bintree_ops *ops);
18
19 #endif