blob: f06d89f0b8678d8407c91db17e8c26250376c5a1 [file] [log] [blame]
Arnaldo Carvalho de Melo9402e232015-05-25 11:49:11 -03001#ifndef __TOOLS_LINUX_PERF_RBTREE_H
2#define __TOOLS_LINUX_PERF_RBTREE_H
Adrian Hunterb155a092012-08-31 10:49:27 +03003#include <stdbool.h>
Arnaldo Carvalho de Melo43cbcd82009-07-01 12:28:37 -03004#include "../../../../include/linux/rbtree.h"
Arnaldo Carvalho de Melo9402e232015-05-25 11:49:11 -03005
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 */
11static 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 */