summaryrefslogtreecommitdiffstats
path: root/share/man/man9/alloc_unr.9
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-06-16 18:46:17 +0000
committerru <ru@FreeBSD.org>2005-06-16 18:46:17 +0000
commit1c089d8fdd238e9f1ab38b6ae03954ac3dd01d48 (patch)
treee73cf1ac6f8727731e6d2079d3c81a64f334b2cb /share/man/man9/alloc_unr.9
parent73ab2fc036124d8b8ca662ced3919e56265959b7 (diff)
downloadFreeBSD-src-1c089d8fdd238e9f1ab38b6ae03954ac3dd01d48.zip
FreeBSD-src-1c089d8fdd238e9f1ab38b6ae03954ac3dd01d48.tar.gz
(Mostly) markup fixes.
Approved by: re (blanket)
Diffstat (limited to 'share/man/man9/alloc_unr.9')
-rw-r--r--share/man/man9/alloc_unr.918
1 files changed, 10 insertions, 8 deletions
diff --git a/share/man/man9/alloc_unr.9 b/share/man/man9/alloc_unr.9
index 90b145d..9d81453 100644
--- a/share/man/man9/alloc_unr.9
+++ b/share/man/man9/alloc_unr.9
@@ -48,37 +48,39 @@
.Sh DESCRIPTION
The kernel unit number allocator is a generic facility, which allows to allocate
unit numbers within a specified range.
-.Bl -ohang
+.Bl -tag -width indent
.It Fn new_unrhdr low high mutex
Initialize a new unit number allocator entity.
+The
.Fa low
and
.Fa high
+arguments
specify minimum and maximum number of unit numbers.
There is no cost associated with the range of unit numbers, so unless the resource
really is finite,
-.Va INT_MAX
+.Dv INT_MAX
can be used.
If
.Fa mutex
is not
-.Va NULL ,
+.Dv NULL ,
it is used for locking when allocating and freeing units.
-Otherwise internal mutex is used.
+Otherwise, internal mutex is used.
.It Fn delete_unrhdr uh
Destroy specified unit number allocator entity.
.It Fn alloc_unr uh
Return a new unit number.
The lowest free number is always allocated.
This function does not allocate memory and never sleeps, however it may
-block on mutex.
-If no free unit numbers are left
-.Va -1
+block on a mutex.
+If no free unit numbers are left,
+.Li \-1
is returned.
.It Fn alloc_unrl uh
Same as
.Fn alloc_unr
-except that mutex is assumed to be locked already and thus is not used.
+except that mutex is assumed to be already locked and thus is not used.
.It Fn free_unr uh
Free a previously allocated unit number.
This function may require allocating memory, and thus it can sleep.
OpenPOWER on IntegriCloud