Date: Tue, 8 Mar 2005 10:40:48 +0000 (UTC) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern subr_unit.c src/sys/sys systm.h Message-ID: <200503081040.j28Aem95077617@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503081040.j28Aem95077617>
