Home
last modified time | relevance | path

Searched refs:ida (Results 1 – 17 of 17) sorted by relevance

/DragonOS/kernel/crates/ida/src/
H A Dlib.rs181 let mut ida = IdAllocator::new(0, 10).unwrap(); in test_id_allocator() localVariable
182 assert_eq!(ida.alloc(), Some(0)); in test_id_allocator()
183 assert_eq!(ida.alloc(), Some(1)); in test_id_allocator()
184 assert_eq!(ida.alloc(), Some(2)); in test_id_allocator()
185 assert_eq!(ida.alloc(), Some(3)); in test_id_allocator()
186 assert_eq!(ida.alloc(), Some(4)); in test_id_allocator()
187 assert_eq!(ida.alloc(), Some(5)); in test_id_allocator()
188 assert_eq!(ida.alloc(), Some(6)); in test_id_allocator()
189 assert_eq!(ida.alloc(), Some(7)); in test_id_allocator()
190 assert_eq!(ida.alloc(), Some(8)); in test_id_allocator()
[all …]
/DragonOS/kernel/src/debug/klog/
H A Dmm.rs19 static __MM_DEBUG_LOG_IDA: SpinLock<ida::IdAllocator> =
20 SpinLock::new(ida::IdAllocator::new(1, usize::MAX).unwrap());
/DragonOS/docs/kernel/libs/
H A Did-allocation.md9 内核提供了一个名为`IdAllocator`的ID分配器,位于`kernel/crates/ida`中。
/DragonOS/kernel/crates/ida/
H A DCargo.toml2 name = "ida"
/DragonOS/kernel/src/driver/virtio/
H A Dsysfs.rs5 use ida::IdAllocator;
259 ida: SpinLock<IdAllocator>, field
269 ida: SpinLock::new(IdAllocator::new(0, usize::MAX).unwrap()), in new()
277 VirtIODeviceIndex(self.ida.lock().alloc().unwrap()) in alloc()
285 self.ida.lock().free(index.0); in free()
/DragonOS/kernel/src/driver/tty/virtual_terminal/
H A Dmod.rs8 use ida::IdAllocator;
139 ida: IdAllocator, field
151 let ida = IdAllocator::new(0, MAX_NR_CONSOLES as usize).unwrap(); in new() localVariable
155 inner: SpinLock::new(InnerVirtConsoleManager { consoles, ida }), in new()
167 let index = inner.ida.alloc()?; in alloc()
183 inner.ida.free(index); in free()
/DragonOS/kernel/src/net/socket/
H A Dhandle.rs1 use ida::IdAllocator;
/DragonOS/kernel/src/namespaces/
H A Dpid_namespace.rs19 use ida::IdAllocator;
27 static PID_IDA: ida::IdAllocator = ida::IdAllocator::new(1, usize::MAX).unwrap();
/DragonOS/kernel/src/driver/tty/
H A Dtty_driver.rs9 use ida::IdAllocator;
138 ida: SpinLock<IdAllocator>, field
176 ida: SpinLock::new(IdAllocator::new(0, count as usize).unwrap()), in new()
305 if self.ida.lock().exists(i) { in init_tty_device()
310 idx = self.ida.lock().alloc().ok_or(SystemError::EBUSY)?; in init_tty_device()
/DragonOS/kernel/
H A DCargo.toml46 ida = { path = "crates/ida" }
/DragonOS/kernel/src/filesystem/devpts/
H A Dmod.rs9 use ida::IdAllocator;
/DragonOS/kernel/src/filesystem/
H A Deventfd.rs16 use ida::IdAllocator;
/DragonOS/kernel/src/driver/base/platform/
H A Dplatform_device.rs5 use ida::IdAllocator;
/DragonOS/kernel/src/driver/rtc/
H A Dsysfs.rs5 use ida::IdAllocator;
/DragonOS/kernel/src/ipc/
H A Dshm.rs20 use ida::IdAllocator;
/DragonOS/kernel/src/mm/
H A Ducontext.rs17 use ida::IdAllocator;
/DragonOS/docs/community/ChangeLog/V0.1.x/
H A DV0.1.9.md434 删除无用的C版本bitree和ida/idr. (#526)