Home
last modified time | relevance | path

Searched refs:cmp (Results 1 – 3 of 3) sorted by relevance

/DragonOS-0.1.2/kernel/src/common/
Dbitree.h17 int (*cmp)(void *a, void *b); // 比较函数 a>b 返回1, a==b返回0, a<b返回-1 member
33 struct bt_root_t *bt_create_tree(struct bt_node_t *node, int (*cmp)(void *a, void *b), int (*releas…
/DragonOS-0.1.2/kernel/src/libs/
Dbitree.c8 #define smaller(root, a, b) (root->cmp((a)->value, (b)->value) == -1)
9 #define equal(root, a, b) (root->cmp((a)->value, (b)->value) == 0)
10 #define greater(root, a, b) (root->cmp((a)->value, (b)->value) == 1)
20 struct bt_root_t *bt_create_tree(struct bt_node_t *node, int (*cmp)(void *a, void *b), int (*releas… in bt_create_tree()
22 if (node == NULL || cmp == NULL) in bt_create_tree()
28 root->cmp = cmp; in bt_create_tree()
/DragonOS-0.1.2/kernel/src/ktest/
Dtest-bitree.c51 assert(tree->cmp == compare); in ktest_bitree_case1()