[patch] extending alloc_unr(9) to allocate specific unit numbers
jh at FreeBSD.org
Sat Jun 19 15:48:27 UTC 2010
I wrote a patch to extend the kernel unit number allocator for
allocating specific unit numbers. The patch adds a new function
alloc_unr_specific() which returns the requested unit number if it is
free and -1 if the number is already allocated or out of the range.
Unlike alloc_unr(), alloc_unr_specific() may allocate memory and thus
The patch is here:
I think that this functionality has been requested by some people.
As an example here is md(4) converted to use
alloc_unr() / alloc_unr_specific():
More information about the freebsd-hackers