Arnaldo Carvalho de Melo | 9402e23 | 2015-05-25 11:49:11 -0300 | [diff] [blame^] | 1 | #ifndef __TOOLS_LINUX_PERF_RBTREE_H |
| 2 | #define __TOOLS_LINUX_PERF_RBTREE_H |
Adrian Hunter | b155a09 | 2012-08-31 10:49:27 +0300 | [diff] [blame] | 3 | #include <stdbool.h> |
Arnaldo Carvalho de Melo | 43cbcd8 | 2009-07-01 12:28:37 -0300 | [diff] [blame] | 4 | #include "../../../../include/linux/rbtree.h" |
Arnaldo Carvalho de Melo | 9402e23 | 2015-05-25 11:49:11 -0300 | [diff] [blame^] | 5 | |
| 6 | /* |
| 7 | * Handy for checking that we are not deleting an entry that is |
| 8 | * already in a list, found in block/{blk-throttle,cfq-iosched}.c, |
| 9 | * probably should be moved to lib/rbtree.c... |
| 10 | */ |
| 11 | static inline void rb_erase_init(struct rb_node *n, struct rb_root *root) |
| 12 | { |
| 13 | rb_erase(n, root); |
| 14 | RB_CLEAR_NODE(n); |
| 15 | } |
| 16 | #endif /* __TOOLS_LINUX_PERF_RBTREE_H */ |