diff options
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/alloc_unr.9 | 18 | ||||
-rw-r--r-- | share/man/man9/devclass_get_drivers.9 | 6 |
2 files changed, 13 insertions, 11 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. diff --git a/share/man/man9/devclass_get_drivers.9 b/share/man/man9/devclass_get_drivers.9 index ee6629b..b5eaf1c 100644 --- a/share/man/man9/devclass_get_drivers.9 +++ b/share/man/man9/devclass_get_drivers.9 @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm devclass_get_drivers -.Nd get a list of drivers in a devclass +.Nd "get a list of drivers in a devclass" .Sh SYNOPSIS .In sys/param.h .In sys/bus.h @@ -46,8 +46,8 @@ devclass and return the list in and the number of drivers in the list in .Fa *countp . The memory allocated for the list should be freed using -.Fn free "*listp" "M_TEMP" . -even if +.Fn free *listp M_TEMP , +even if .Fa *countp is 0. .Sh RETURN VALUES |