Lines Matching defs:IdPool
33 /// use kernel::id_pool::{IdPool, UnusedId};
35 /// let mut pool = IdPool::with_capacity(64, GFP_KERNEL)?;
56 /// use kernel::id_pool::IdPool;
58 /// fn get_id_maybe_realloc(guarded_pool: &SpinLock<IdPool>) -> Result<usize, AllocError> {
74 pub struct IdPool {
78 /// Indicates that an [`IdPool`] should change to a new target size.
83 /// Contains a [`BitmapVec`] of a size suitable for reallocating [`IdPool`].
89 /// Allocates a new backing [`BitmapVec`] for [`IdPool`].
93 /// [`IdPool::grow`] or [`IdPool::shrink`] operation, which will check
101 impl IdPool {
102 /// Constructs a new [`IdPool`].
114 /// Constructs a new [`IdPool`] with space for a specific number of bits.
132 /// Returns a [`ReallocRequest`] if the [`IdPool`] can be shrunk, [`None`] otherwise.
134 /// The capacity of an [`IdPool`] cannot be shrunk below [`MAX_INLINE_LEN`].
145 /// IdPool,
150 /// let mut pool = IdPool::with_capacity(1024, GFP_KERNEL)?;
199 /// Returns a [`ReallocRequest`] for growing this [`IdPool`], if possible.
201 /// The capacity of an [`IdPool`] cannot be grown above [`MAX_LEN`].
290 /// Represents an unused id in an [`IdPool`].
297 pool: &'pool mut IdPool,
335 impl Default for IdPool {