Home
last modified time | relevance | path

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

/DragonOS-0.1.8/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()
Drbtree.rs14 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()
Delf.rs2 cmp::min,
/DragonOS-0.1.8/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.8/kernel/src/mm/
Dmod.rs10 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()
Ducontext.rs4 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/
Dmod.rs7 use core::cmp::Ordering;
217 match item.device_number().major().cmp(&major) { in __register_chardev_region()
/DragonOS-0.1.8/kernel/src/ktest/
Dtest-bitree.c51 assert(tree->cmp == compare); in ktest_bitree_case1()
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dbuddy.rs11 use core::cmp::{max, min};
/DragonOS-0.1.8/kernel/src/arch/x86_64/mm/
Dmod.rs460 core::cmp::min(page_align_up(random_size as usize), TOTAL_SIZE - allocated); in test_buddy()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dsyscall.rs709 let len = core::cmp::min(slice.len(), data.len()); in scatter()
/DragonOS-0.1.8/kernel/src/net/
Dsyscall.rs1 use core::cmp::min;
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs46 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()
Dentry.rs2 use core::{cmp::min, intrinsics::unlikely};