#include <libubox/avl.h>
#include <stdint.h>
Go to the source code of this file.
◆ ubus_alloc_id()
bool ubus_alloc_id |
( |
struct avl_tree * |
tree, |
|
|
struct ubus_id * |
id, |
|
|
uint32_t |
val |
|
) |
| |
Definition at line 53 of file ubusd_id.c.
55 id->avl.key = &
id->id;
58 return avl_insert(tree, &id->
avl) == 0;
67 }
while (avl_insert(tree, &id->
avl) != 0);
#define UBUS_SYSTEM_OBJECT_MAX
◆ ubus_find_id()
static struct ubus_id* ubus_find_id |
( |
struct avl_tree * |
tree, |
|
|
uint32_t |
id |
|
) |
| |
|
inlinestatic |
Definition at line 34 of file ubusd_id.h.
38 avl = avl_find(tree, &
id);
42 return container_of(avl,
struct ubus_id, avl);
◆ ubus_free_id()
static void ubus_free_id |
( |
struct avl_tree * |
tree, |
|
|
struct ubus_id * |
id |
|
) |
| |
|
inlinestatic |
◆ ubus_init_id_tree()
void ubus_init_id_tree |
( |
struct avl_tree * |
tree | ) |
|
Definition at line 40 of file ubusd_id.c.
43 random_fd = open(
"/dev/urandom", O_RDONLY);
static int ubus_cmp_id(const void *k1, const void *k2, void *ptr)
◆ ubus_init_string_tree()
void ubus_init_string_tree |
( |
struct avl_tree * |
tree, |
|
|
bool |
dup |
|
) |
| |
Definition at line 35 of file ubusd_id.c.
37 avl_init(tree, avl_strcmp, dup, NULL);