}
static inline void
-rbe_rotate_left(const struct rb_type *t, struct rb_tree *rbt,
+rbe_rotate_left(const struct rb_type *t, struct rbt_tree *rbt,
struct rb_entry *rbe)
{
struct rb_entry *parent;
}
static inline void
-rbe_rotate_right(const struct rb_type *t, struct rb_tree *rbt,
+rbe_rotate_right(const struct rb_type *t, struct rbt_tree *rbt,
struct rb_entry *rbe)
{
struct rb_entry *parent;
}
static inline void
-rbe_insert_color(const struct rb_type *t, struct rb_tree *rbt,
+rbe_insert_color(const struct rb_type *t, struct rbt_tree *rbt,
struct rb_entry *rbe)
{
struct rb_entry *parent, *gparent, *tmp;
}
static inline void
-rbe_remove_color(const struct rb_type *t, struct rb_tree *rbt,
+rbe_remove_color(const struct rb_type *t, struct rbt_tree *rbt,
struct rb_entry *parent, struct rb_entry *rbe)
{
struct rb_entry *tmp;
}
static inline struct rb_entry *
-rbe_remove(const struct rb_type *t, struct rb_tree *rbt, struct rb_entry *rbe)
+rbe_remove(const struct rb_type *t, struct rbt_tree *rbt, struct rb_entry *rbe)
{
struct rb_entry *child, *parent, *old = rbe;
unsigned int color;
}
void *
-_rb_remove(const struct rb_type *t, struct rb_tree *rbt, void *elm)
+_rb_remove(const struct rb_type *t, struct rbt_tree *rbt, void *elm)
{
struct rb_entry *rbe = rb_n2e(t, elm);
struct rb_entry *old;
}
void *
-_rb_insert(const struct rb_type *t, struct rb_tree *rbt, void *elm)
+_rb_insert(const struct rb_type *t, struct rbt_tree *rbt, void *elm)
{
struct rb_entry *rbe = rb_n2e(t, elm);
struct rb_entry *tmp;
/* Finds the node with the same key as elm */
void *
-_rb_find(const struct rb_type *t, struct rb_tree *rbt, const void *key)
+_rb_find(const struct rb_type *t, struct rbt_tree *rbt, const void *key)
{
struct rb_entry *tmp = RBH_ROOT(rbt);
void *node;
/* Finds the first node greater than or equal to the search key */
void *
-_rb_nfind(const struct rb_type *t, struct rb_tree *rbt, const void *key)
+_rb_nfind(const struct rb_type *t, struct rbt_tree *rbt, const void *key)
{
struct rb_entry *tmp = RBH_ROOT(rbt);
void *node;
}
void *
-_rb_root(const struct rb_type *t, struct rb_tree *rbt)
+_rb_root(const struct rb_type *t, struct rbt_tree *rbt)
{
struct rb_entry *rbe = RBH_ROOT(rbt);
}
void *
-_rb_min(const struct rb_type *t, struct rb_tree *rbt)
+_rb_min(const struct rb_type *t, struct rbt_tree *rbt)
{
struct rb_entry *rbe = RBH_ROOT(rbt);
struct rb_entry *parent = NULL;
}
void *
-_rb_max(const struct rb_type *t, struct rb_tree *rbt)
+_rb_max(const struct rb_type *t, struct rbt_tree *rbt)
{
struct rb_entry *rbe = RBH_ROOT(rbt);
struct rb_entry *parent = NULL;
unsigned int t_offset; /* offset of rb_entry in type */
};
-struct rb_tree {
+struct rbt_tree {
struct rb_entry *rbt_root;
};
#define RB_HEAD(_name, _type) \
struct _name { \
- struct rb_tree rbh_root; \
+ struct rbt_tree rbh_root; \
}
#define RB_ENTRY(_type) struct rb_entry
static inline void
-_rb_init(struct rb_tree *rbt)
+_rb_init(struct rbt_tree *rbt)
{
rbt->rbt_root = NULL;
}
static inline int
-_rb_empty(struct rb_tree *rbt)
+_rb_empty(struct rbt_tree *rbt)
{
return (rbt->rbt_root == NULL);
}
-void *_rb_insert(const struct rb_type *, struct rb_tree *, void *);
-void *_rb_remove(const struct rb_type *, struct rb_tree *, void *);
-void *_rb_find(const struct rb_type *, struct rb_tree *, const void *);
-void *_rb_nfind(const struct rb_type *, struct rb_tree *, const void *);
-void *_rb_root(const struct rb_type *, struct rb_tree *);
-void *_rb_min(const struct rb_type *, struct rb_tree *);
-void *_rb_max(const struct rb_type *, struct rb_tree *);
+void *_rb_insert(const struct rb_type *, struct rbt_tree *, void *);
+void *_rb_remove(const struct rb_type *, struct rbt_tree *, void *);
+void *_rb_find(const struct rb_type *, struct rbt_tree *, const void *);
+void *_rb_nfind(const struct rb_type *, struct rbt_tree *, const void *);
+void *_rb_root(const struct rb_type *, struct rbt_tree *);
+void *_rb_min(const struct rb_type *, struct rbt_tree *);
+void *_rb_max(const struct rb_type *, struct rbt_tree *);
void *_rb_next(const struct rb_type *, void *);
void *_rb_prev(const struct rb_type *, void *);
void *_rb_left(const struct rb_type *, void *);