Searched refs:cmp (Results 1 – 8 of 8) sorted by relevance
/DragonOS-0.1.7/kernel/src/libs/ |
D | bitree.c | 8 #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()
|
D | rbtree.rs | 14 use core::cmp::Ord; 15 use core::cmp::Ordering; 73 fn cmp(&self, other: &NodePtr<K, V>) -> Ordering { in cmp() method 74 unsafe { (*self.0).key.cmp(&(*other.0).key) } in cmp() 80 unsafe { Some((*self.0).key.cmp(&(*other.0).key)) } in partial_cmp() 1029 match node.cmp(&&mut x) { in insert() 1043 match node.cmp(&&mut y) { in insert() 1067 let next = match k.cmp(&(*temp.0).key) { in find_node()
|
/DragonOS-0.1.7/kernel/src/common/ |
D | bitree.h | 17 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.7/kernel/src/ktest/ |
D | test-bitree.c | 51 assert(tree->cmp == compare); in ktest_bitree_case1()
|
/DragonOS-0.1.7/kernel/src/filesystem/vfs/ |
D | syscall.rs | 512 let len = core::cmp::min(slice.len(), data.len()); in scatter()
|
/DragonOS-0.1.7/kernel/src/net/ |
D | syscall.rs | 1 use core::cmp::min;
|
/DragonOS-0.1.7/kernel/src/filesystem/fat/ |
D | fs.rs | 46 fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> { in partial_cmp()
|
D | entry.rs | 2 use core::cmp::min;
|