diff options
author | phk <phk@FreeBSD.org> | 2004-09-30 07:04:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-09-30 07:04:03 +0000 |
commit | fbd7b98a6af12291eb512778ba82211637aee056 (patch) | |
tree | 83777b969e7ebbfc387df2feaced9cdae8e9976b /sys/conf | |
parent | bb789614a3e0b9cceb48af75043ce0bce36ec635 (diff) | |
download | FreeBSD-src-fbd7b98a6af12291eb512778ba82211637aee056.zip FreeBSD-src-fbd7b98a6af12291eb512778ba82211637aee056.tar.gz |
Add a new API for allocating unit number (-like) resources.
Allocation is always lowest free unit number.
A mixed range/bitmap strategy for maximum memory efficiency. In
the typical case where no unit numbers are freed total memory usage
is 56 bytes on i386.
malloc is called M_WAITOK but no locking is provided (yet). A bit of
experience will be necessary to determine the best strategy. Hopefully
a "caller provides locking" strategy can be maintained, but that may
require use of M_NOWAIT allocation and failure handling.
A userland test driver is included.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/files | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/conf/files b/sys/conf/files index 09c0243..2e4ceec 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1143,6 +1143,7 @@ kern/subr_smp.c standard kern/subr_taskqueue.c standard kern/subr_trap.c standard kern/subr_turnstile.c standard +kern/subr_unit.c standard kern/subr_witness.c optional witness kern/sys_generic.c standard kern/sys_pipe.c standard |