Searched refs:cmp (Results 1 – 14 of 14) sorted by relevance
/DragonOS-0.1.8/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()
|
D | elf.rs | 2 cmp::min,
|
/DragonOS-0.1.8/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.8/kernel/src/mm/ |
D | mod.rs | 10 cmp, 597 fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> { in partial_cmp() 603 fn cmp(&self, other: &Self) -> cmp::Ordering { in cmp() method 604 return self.start.cmp(&other.start); in cmp()
|
D | ucontext.rs | 4 cmp, 653 let region = VirtRegion::new(cmp::max(*hole_vaddr, min_vaddr), *size); in find_free() 1152 fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> { in partial_cmp() 1158 fn cmp(&self, other: &Self) -> cmp::Ordering { in cmp() method 1159 return self.region.cmp(&other.region); in cmp()
|
/DragonOS-0.1.8/kernel/src/driver/base/char/ |
D | mod.rs | 7 use core::cmp::Ordering; 217 match item.device_number().major().cmp(&major) { in __register_chardev_region()
|
/DragonOS-0.1.8/kernel/src/ktest/ |
D | test-bitree.c | 51 assert(tree->cmp == compare); in ktest_bitree_case1()
|
/DragonOS-0.1.8/kernel/src/mm/allocator/ |
D | buddy.rs | 11 use core::cmp::{max, min};
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/mm/ |
D | mod.rs | 460 core::cmp::min(page_align_up(random_size as usize), TOTAL_SIZE - allocated); in test_buddy()
|
/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | syscall.rs | 709 let len = core::cmp::min(slice.len(), data.len()); in scatter()
|
/DragonOS-0.1.8/kernel/src/net/ |
D | syscall.rs | 1 use core::cmp::min;
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 46 fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> { in partial_cmp() 1487 let write_size = core::cmp::min(remain_size, buf_size); in resize()
|
D | entry.rs | 2 use core::{cmp::min, intrinsics::unlikely};
|