cvs commit: src/sys/kern subr_unit.c src/sys/sys systm.h
Poul-Henning Kamp
phk at FreeBSD.org
Tue Mar 8 10:40:49 GMT 2005
phk 2005-03-08 10:40:48 UTC
FreeBSD src repository
Modified files:
sys/kern subr_unit.c
sys/sys systm.h
Log:
Reengineer subr_unit
Add support for passing in a mutex. If NULL is passed a global
subr_unit mutex is used.
Add alloc_unrl() which expects the mutex to be held.
Allocating a unit will never sleep as it does not need to allocate
memory.
Cut possible range in half so we can use -1 to mean "out of number".
Collapse first and last runs into the head by means of counters.
This saves memory in the common case(s).
Revision Changes Path
1.6 +511 -287 src/sys/kern/subr_unit.c
1.227 +3 -2 src/sys/sys/systm.h
More information about the cvs-src
mailing list