/DragonOS/kernel/crates/ida/src/ |
H A D | lib.rs | 50 pub struct IdAllocator { struct 58 impl IdAllocator { argument 153 impl core::fmt::Debug for IdAllocator { implementation 170 assert_eq!(IdAllocator::new(10, 10).is_none(), true); in test_new_fail() 171 assert_eq!(IdAllocator::new(11, 10).is_none(), true); in test_new_fail() 175 assert_eq!(IdAllocator::new(9, 10).is_some(), true); in test_new_success() 176 assert_eq!(IdAllocator::new(0, 10).is_some(), true); in test_new_success() 181 let mut ida = IdAllocator::new(0, 10).unwrap(); in test_id_allocator()
|
/DragonOS/kernel/src/net/socket/ |
H A D | handle.rs | 1 use ida::IdAllocator; 17 static KERNEL_HANDLE_IDA: SpinLock<IdAllocator> = 18 SpinLock::new(IdAllocator::new(0, usize::MAX).unwrap());
|
/DragonOS/kernel/src/namespaces/ |
H A D | pid_namespace.rs | 19 use ida::IdAllocator; 27 static PID_IDA: ida::IdAllocator = ida::IdAllocator::new(1, usize::MAX).unwrap(); 31 id_alloctor: RwLock<IdAllocator>, 216 id_alloctor: RwLock::new(IdAllocator::new(1, PID_MAX).unwrap()), in new() 250 id_alloctor: RwLock::new(IdAllocator::new(1, PID_MAX).unwrap()), in create_pid_namespace()
|
/DragonOS/kernel/src/debug/klog/ |
H A D | mm.rs | 19 static __MM_DEBUG_LOG_IDA: SpinLock<ida::IdAllocator> = 20 SpinLock::new(ida::IdAllocator::new(1, usize::MAX).unwrap());
|
/DragonOS/docs/kernel/libs/ |
H A D | id-allocation.md | 9 内核提供了一个名为`IdAllocator`的ID分配器,位于`kernel/crates/ida`中。
|
/DragonOS/kernel/src/filesystem/devpts/ |
H A D | mod.rs | 9 use ida::IdAllocator; 44 pts_ida: SpinLock<IdAllocator>, 53 pts_ida: SpinLock::new(IdAllocator::new(0, NR_UNIX98_PTY_MAX as usize).unwrap()), in new()
|
/DragonOS/kernel/src/filesystem/ |
H A D | eventfd.rs | 16 use ida::IdAllocator; 19 static EVENTFD_ID_ALLOCATOR: SpinLock<IdAllocator> = 20 SpinLock::new(IdAllocator::new(0, u32::MAX as usize).unwrap());
|
/DragonOS/kernel/src/driver/base/platform/ |
H A D | platform_device.rs | 5 use ida::IdAllocator; 30 static PLATFORM_DEVID_IDA: SpinLock<IdAllocator> = 31 SpinLock::new(IdAllocator::new(0, i32::MAX as usize).unwrap());
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | sysfs.rs | 5 use ida::IdAllocator; 259 ida: SpinLock<IdAllocator>, 269 ida: SpinLock::new(IdAllocator::new(0, usize::MAX).unwrap()), in new()
|
/DragonOS/kernel/src/driver/rtc/ |
H A D | sysfs.rs | 5 use ida::IdAllocator; 37 static RTC_GENERAL_DEVICE_IDA: SpinLock<IdAllocator> = 38 SpinLock::new(IdAllocator::new(0, usize::MAX).unwrap());
|
/DragonOS/kernel/src/driver/tty/virtual_terminal/ |
H A D | mod.rs | 8 use ida::IdAllocator; 139 ida: IdAllocator, 151 let ida = IdAllocator::new(0, MAX_NR_CONSOLES as usize).unwrap(); in new()
|
/DragonOS/kernel/src/ipc/ |
H A D | shm.rs | 20 use ida::IdAllocator; 118 id_allocator: IdAllocator, 128 id_allocator: IdAllocator::new(0, usize::MAX - 1).unwrap(), in new()
|
/DragonOS/kernel/src/driver/tty/ |
H A D | tty_driver.rs | 9 use ida::IdAllocator; 138 ida: SpinLock<IdAllocator>, 176 ida: SpinLock::new(IdAllocator::new(0, count as usize).unwrap()), in new()
|
/DragonOS/kernel/src/mm/ |
H A D | ucontext.rs | 17 use ida::IdAllocator; 57 static LOCKEDVMA_ID_ALLOCATOR: SpinLock<IdAllocator> = 58 SpinLock::new(IdAllocator::new(0, usize::MAX).unwrap());
|