4 #include <libubox/avl.h>
12 void ubus_init_id_tree(struct avl_tree
*tree
);
13 void ubus_init_string_tree(struct avl_tree
*tree
, bool dup
);
14 bool ubus_alloc_id(struct avl_tree
*tree
, struct ubus_id
*id
, uint32_t val
);
16 static inline void ubus_free_id(struct avl_tree
*tree
, struct ubus_id
*id
)
18 avl_delete(tree
, &id
->avl
);
21 static inline struct ubus_id
*ubus_find_id(struct avl_tree
*tree
, uint32_t id
)
25 avl
= avl_find(tree
, &id
);
29 return container_of(avl
, struct ubus_id
, avl
);