mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-21 22:43:23 +00:00
feat(ida): IDA内部改为使用XArray实现 (#934)
目前可以记录哪些ID已经分配,支持了ID释放的功能. Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
11
docs/kernel/libs/id-allocation.md
Normal file
11
docs/kernel/libs/id-allocation.md
Normal file
@ -0,0 +1,11 @@
|
||||
# ID分配
|
||||
|
||||
:::{note}
|
||||
本文作者:龙进 <longjin@DragonOS.org>
|
||||
|
||||
2024年9月25日
|
||||
:::
|
||||
|
||||
内核提供了一个名为`IdAllocator`的ID分配器,位于`kernel/crates/ida`中。
|
||||
|
||||
它能够分配、释放ID。默认它会自增分配,假如ID大于设定的最大值,它会从最小值开始寻找空闲ID。如果没有空闲的ID,则会分配失败。
|
Reference in New Issue
Block a user